The button does not trigger the corresponding action (tag button and enter button = button)

My jquery code works with Chrome, Firefox,> IE8, but it seems that jQuery and jquery ui are not loaded on IE8.

Javascript is included.

I use <meta http-equiv="X-UA-Compatible" content="IE=7,IE=8" /> because I had some problems with IE9

 <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=8" /> <link href="css/my.css" rel="stylesheet" type="text/css" media="screen" /> <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.8.2.js"></script> <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script> <script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script> <link href="css/jquery-ui-timepicker-addon.css" rel="stylesheet" type="text/css" media="screen" /> <script type="text/javascript"> $(function(){ }); // Sorry, really it so and not only } </script> </head> 

Any suggestion? What should I check?

EDIT

Changing

 <meta http-equiv="X-UA-Compatible" content="IE=7,IE=8" /> 

to

 <meta http-equiv="X-UA-Compatible" content="IE=8" /> 

fixes most problems in IE8.

The only problem that still remains is with the popup:

when there is a button that causes the pop-up window, clicking on the pop-up "OK" does not cause the corresponding action (the button is inside the tag).

+4
source share
2 answers

Have you tried this?

 <meta http-equiv="X-UA-Compatible" content="IE=8,IE=EDGE" /> 
+3
source

Could you put it in the jQuery.Ready function and see if it works more consistently between browsers? I see that the comments suggested the same thing using a different format:

 <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=8" /> <link href="css/my.css" rel="stylesheet" type="text/css" media="screen" /> <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.8.2.js"></script> <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script> <script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script> <link href="css/jquery-ui-timepicker-addon.css" rel="stylesheet" type="text/css" media="screen" /> <script type="text/javascript"> $(document).ready(function(){ // do something here... }); // Sorry, really it so and not only } </script> </head> 

..

Also suggest updating jquery, jquery-ui and jquery-ui css and checking jquery to the latest versions. You should be able to use the javascript modernizr library to determine which version of the browser you have, and then apply those meta tags to suit your needs.

This link will determine which version of the browser you are using modernizr.

0
source

Source: https://habr.com/ru/post/1492378/


All Articles