Trying to see if an element has a particular CSS attribute in the style tag

I am trying to do something like:\[code\]var $list = new Array();$selector.each(function(){ if ( $(this).has(css("position")) ){ $list.push($(this)); }});\[/code\]It doesnt seem like the way i was doing it was working. I saw an example that looked like:\[code\]var bg = ('element').parents().filter(function() { return $(this).css('background').length > 0;}).eq(0)\[/code\]but i wasnt sure if thats what i should do, or if there was another way of doing it.
 
Top