says that the selector property is going to be deprecated soon. However, i see that the selector property is available in all versions of jQuery upto 2.1.1. So does this mean that this feature is going to be removed from all versions or only in the latest version? Also, can you explain why this is being deprecated. This feature seems quite useful when trying to identify the element on which say, an event listener was registered.
We are trying to write a wrapper around the .on functionality so that all events get delegated to the container event though the events are being bound at an element level.
For example: say there exists a parent container <div class="parent-container"></div>.
There exists a child element div#123. And we have our own custom _on method. If someone uses $("#123")._on("click", handler), we'd like to hijack this listener and delegate the event to the parent container as $(".parent-container").on("click", "#123", handler). In this case, the most efficient way to get selector used in _on is through the selector property. Was wondering if you can suggest a more efficient way to achieve the same, if the selector property is being deprecated.