Hello,
This is what I’m trying to achieve:
When a button is clicked, have jQuery look at it’s class. If it’s class has the word "print" in it, or even starts with "p", do some special animation. If it has a class that contains "video", then do a different animation.
Here is my code so far:
Code:
$(“#grid li a”).click(function() {
var buttonClass = $(this).attr(‘class’);
if (buttonClass == ‘print’) {
// DO SOMETHING
}
});
The problem is, that simply saying "==" won’t work, since the button classes in my html are "print01", "print02", etc… which is used for other purposes like knowing which print div to show. So how can I get it to just look for the word "print" instead of having to match the full class name exactly? Thanks!