How do you select elements based on their style?

Using the filter function:

$('*').filter(function() {
     return $(this).css('float') == 'left';
});

Replace ‘*’ with the appropriate selectors for your case.

Leave a Comment