简体   繁体   中英

jQuery flash object click event not firing in IE or Chrome

I'm just trying to understand a difference between IE, Chrome and Firefox. I have the following code on a page:

$('object').live('click', function(){
    alert('Fired');
});

I then populate the page with some Flash controls (in my case, I'm using Uploadify). When I click on the Flash control, I see the alert in Firefox 4. However, I do not see the alert in IE8 or Chrome (I havent tested any other browsers).

Is there something obvious I'm missing?

Many thanks.

Could we see more code? This seems like it should work, so I can see why you're puzzled. Could be a syntactical error in your markup. Maybe try something like this, unless you have a specific reason for the live() .

$('object').click(function() {
    alert('Fired!');
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM