Is there a way to retrieve the selector as a string “myClass” within a plugin.
I tried the selector property but it returns empty string.
I didn’t even find documentation about that selector property can someone point me to some ?
Or am i in the wrong path ?
I call plugin with
$(".myClass").myPlugin();
Link to code:
http://jsfiddle.net/zs4mY/1/
There is no docs for it but it has stayed the same from jQuery 1.0 to jQuery 1.7.2
http://jsfiddle.net/zs4mY/4/
I would not rely on this at all in a plugin though. There are too many other ways to make a jQuery object where selector is meaningless or not available.