My selector doesn't work in IE
Hello, I have a problem with a jQuery selector that works in both Firefox and Chrome but refuses to in Internet Explorer.
The jQuery line looks like
- $('a[id*="show_ingredients_link"]').click(function(){
- var id = this.id.replace("show_ingredients_link", "");
- $(".ingredient_row" + id).toggle(); return false;
- });
Which is trying to select a click on the following bit of HTML (this is a Django template)
- <a href="#" id="show_ingredients_link{{ i.id }}">
(Customise)
</a>
The intent is to toggle the visibility of some table rows that exist just below the (Customise) link.
I can tell this is a selector problem by adding an alert(); in the click function which isn't fired in IE.
Thanks for any help you can give.
~sm