javascript - IE9 error '$'is not defined -
<!--[if lte ie 9]><html class="lte9"><![endif]--><!--[if gt ie 9]><html><![endif]--> <!--[if !ie]><!--> <html> <!--<![endif]--> blah blah <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script src="{{ asset('js/mypage.js') }}" type="text/javascript"></script> </body> </html>
when load page, ie9 brings error '$' not defined
. how can solve error?
+++ mypage.js
$(function(){ //when load page, //ie9 tag not moving. $(window).load(function() { $('div.mask').hide(); }); // when click , willshow show. //for not ie 9 if (!$('html').hasclass('lte9')) { var = $('ul.about > li > span.activebtn'); var willshow = $('div.willshow'); about.on('click',function(){ willshow.toggleclass('active'); about.html(function(){ if ($(willshow).hasclass('active')) { return 'close'; } return 'about'; }); }); } // because css3 not working in ie9. if($('html').hasclass('lte9')) { about.click(function(){ willshow.animate({ 'left': '0' }, 500); about.html(function(){ if (willshow.hasclass('active')) { return 'close'; about.click(function(){ willshow.animate({ 'left': '-100%' }, 500); }); } return 'about'; }); }); } });
check js file plz. beacause ie9 not support css3, want make animate function in place of css3. work in chrome.
Comments
Post a Comment