Skip to content

Instantly share code, notes, and snippets.

@dirceu
Created May 18, 2012 13:16
Show Gist options
  • Save dirceu/2725201 to your computer and use it in GitHub Desktop.
Save dirceu/2725201 to your computer and use it in GitHub Desktop.
jQuery selectors for elements with display 'block' and 'inline'
(function($) {
$.extend($.expr[':'], {
inline: function(a) {
return $(a).css('display') == 'inline';
},
block: function(a) {
return $(a).css('display') == 'block';
}
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment