JQuery click() not fired in ie8

怎甘沉沦 提交于 2019-12-01 12:42:00

I am not sure whether this helps or not. But try replacing

$('#impressionen').click();

with

$('#impressionen').trigger('click');

See

trigger

Trigger an event on every matched element.

What is subscribed to that click event?

I would expect the following to work:

//set up event
$('#impressionen').click(function() { 
    alert('it works!');
});

//alert should show in all browsers
$('#impressionen').click();

However this is a simple example - there are other things that can break this. How are you setting up the click event?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!