I have a DIV:
<div id="leftBoxTools" class="toolboxHeaders" style="margin-top: 10px; width: 100%">
TOOLS</div>
that I want to fire a click event when someone clicks anywhere on it so I can make a sort of collapsible toolbox :
$(".toolboxHeaders").click(function () {
$(this).next().slideToggle("slow");
});
Works fine in ff and chrome but in ie9 it only works if you click on the actual text and not anywhere in the div… any ideas?
UPDATE:
Just to clarify a bit, this is all happening in a JQ UI Dialog box. Not sure if that could be causing a problem. I have looked at the JSFiddle’s from this post and they all work fine in IE9. Yet, I still cannot get my particular issue to work.
I am also doing all this in an old aspx application that is using frames AND master pages (guh)… so it’s really hard to tell what is causing this.
I HAVE changed the doctype to HTML5 but still can’t get it to fire a click on anything but the text.
Double check the
DOCTYPEyou are using.I did a live test, http://jsfiddle.net/kYcD9/ , and it is working fine in IE9.