I am trying to see if an element have a specific CSS attribute. I am thinking at something like this:
if ( !$(this).attr(\'font-style\', \'italic\')) { alert
Here's a simple plugin to do that (tested):
$.fn.hasCss = function(prop, val) { return $(this).css(prop.toLowerCase()) == val.toLowerCase(); } $(document).ready(function() { alert($("a").hasCss("Font-Style", "Italic")); }); Test