$("#listView object.modal").click(function(){
// Get the ID of the clicked link:
var link = $(this).closest("h2").attr("title");
var id = $(this).closest("div").attr("id");
showDialog(link, id);
return false;
});
This fires a modal (jQuery UI). It it working in FF, Chrome/Safari but not in IE 7/8. Is there something I'm missing here?
Big Picture: We're using a swf to render custom type and there is a link in the rendered (flash) content. We're hoping to catch the link action in the jQuery listener so we don't have to extend our swf have an optional param to return false
on link click.
We thought we got around it, until IE testing commenced...
Let me know if any more info is needed. Thanks!
The strange thing is that is working in other browsers. Not that it doesn't work in IE. Have a look at this question. Flash objects will always consume the onclick event and not propagate it in javascript code.
来源:https://stackoverflow.com/questions/2701760/jquery-click-listener-on-object-in-ie-failing