javascript - no click event in (some) Internet Explorers -


i have problems jquery-click-events on button-elements not firing in internet explorers.

this not related submitting forms, found many questions regarding problems this, no duplicate question.

i made simple example illustrate problem:

it test-button, colored red prove jquery works , click handler colouring blue , showing alert. here jquery code :

$('#foo').on('click', function(){   $('#foo').css('color', 'blue');   alert('test'); }).css('color', 'red'); 

here html code :

<html>   <body>     <button id="foo">test</button>     <script src="http://code.jquery.com/jquery-1.9.1.js"></script>   </body> </html> 

the problem is, click event not fire on pcs in internet explorer. on other pcs works in ie , on pcs in other browsers.

here screenshot of not working ie: not working example

i searched through options , compatibility modes , did not find solution/reason this.

ideas anyone?


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -