/ Published in: jQuery

Example given in the book jQuery Enlightenment.
Create your own custom selectors in jQuery and manipulate as usual.
Create your own custom selectors in jQuery and manipulate as usual.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$.expr[":"].positionAbsolute = function(el){ return $(el).css("position") === "absolute"; }; //Usage alert($(":positionAbsolute").length); //alerts number elements positioned absolutley //Or use a filter $("div").filter(function(){return $(this).css('position') === 'absolute';});
Comments
