So simple, but can't get this to work in IE9. Ive read tons of answers and nothing seems to work. I just need to add a class to an elements parent, seems simple right? In all other browsers, this does the trick:
$('#trigger').click(function(e){
e.preventDefault();
$(this).parent().addClass('bar');
});
Not in IE9. The solutions Ive found don't work either:
$('#trigger').click(function(e) {
e.preventDefault();
var item = $(this).closest("li");
$(item).addClass('bar');
});
This is working in IE9