Extend jQuery is() function


/ Published in: jQuery
Save to your folder(s)

This extends jQuery.is() so now you can use if ($(element).is())


Copy this code and paste it in your HTML
  1. (function($) { $.fn.extend({ _is: $.fn.is, is: function(s) { return this._is(s || '*');} }); })(jQuery)

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.