I would try to find all \"absolute\" elements in my page; with jQuery I though it would be something like
$(\'[position=\"absolute\"]\')
bu
Building on Nicola's answer, you can also extend jQuery's selector engine.
$.extend($.expr[':'],{
absolute: function(el) {
return $(el).css('position') === 'absolute';
},
relative: function (el) {
return $(el).css('position') === 'relative';
},
static: function (el) {
return $(el).css('position') === 'static';
},
fixed: function (el) {
return $(el).css('position') === 'fixed';
}
});
Then you can you do things like this.
$(':absolute');
$('div.sidebar:relative');