.selector is deprecated. That means that it
will
probably
be removed. No date or particular version, that I have seen, is
yet marked for the removal.
The usual advice is "Change your logic."
The link you shared has a work-around, using
-
$.fn.foo = function(
selector
, options ) { /* plugin code goes
here */ };,
and the person using the plugin would write
-
$( "div.bar" ).foo( "
div.bar
", {dog: "bark"} );
Basically, you have to pass the selector around yourself.
JΛ̊KE