Do something in jquery if element has exact property & value
I want to do something in jquery if my element has a given property & value.
This is what I'm trying that doesn't work:
if ($('.myElement').css('opacity','1')){
console.log('test');
}
What is the correct syntax for this?
No comments:
Post a Comment