Selector Detector Bookmarklet

One of the strangest, most difficult parts of learning how to use jQuery, in my opinion, is using "selectors." Selectors are jQuery's way of selecting elements within the DOM to alter, add, delete, store, etc. Makes sense, right? Seems easy enough, yes?

It seems easy until you start trying to learn and use it. A lot of beginners struggle learning the different selectors and how they work. After seeing this, I have created a handy little bookmarklet. Click on the bookmarklet and then click on an element on a page. The element's selector is displayed and the element which would be selected when using that selector is highlighted (let's see how many times I can use select in a sentence). Granted, this is not a perfect solution. Far from it! It is, however, good at solving simple jQuery Selector problems.

Source (www.jessiemorris.com)


Download Bookmarklet:


View Bookmarklet Code:

Bookmarklet Source Code:

javascript%3A%28function%28%29%7Bvar%2520d%3Ddocument%3Bvar%2520s%3Dd.createElement%28%27script%27%29%3Bs.text%3D%22KOBJ_config%3D%7B%27rids%27%3A%5B%27a41x90%27%5D%7D%3B%22%3Bd.body.appendChild%28s%29%3Bvar%2520l%3Dd.createElement%28%27script%27%29%3Bl.src%3D%22http%3A//init.kobj.net/js/shared/kobj-static.js%22%3Bd.body.appendChild%28l%29%3B%7D%29%28%29


Rate it:


Tags:

Comments

Comments so far. Add yours.