Guernica Posted September 24, 2011 Share Posted September 24, 2011 Hey there, I am having a problem with the jquery on my website with Internet Explorer. I have only tested it in IE9 but what i does is it doesn't hide the dropdowns for the list on the right side. The code is like this: <script type="text/javascript"> jQuery.noConflict(); function initMenu() { jQuery('#resources ul').hide(); jQuery('#resources li a').click( function() { var checkElement = jQuery(this).next(); var one = jQuery(this); if((checkElement.is('ul')) && (checkElement.is(':visible'))) { return false; } if((checkElement.is('ul')) && (!checkElement.is(':visible'))) { jQuery('#resources ul:visible').slideUp('normal'); jQuery('#resources li a').removeClass('selected'); checkElement.slideDown('normal'); one.addClass('selected'); return false; } } ); } jQuery(function(){ // bind change event to select jQuery('#jumpMenu').bind('change', function () { var url = jQuery(this).val(); // get selected value if (url) { // require a URL window.location = url; // redirect } return false; }); }); jQuery(document).ready(function() {initMenu();}); jQuery(document).ready(function(){ jQuery(function () { jQuery('div.iframe').load("forum/index.php #navbar"); }); }); </script> It works well in Firefox, however I have noticed that every once in a while it will not load the jquery fully when I go to a new page and the dropdowns will show up expanded instead of collapsed which should be the default. Here is an example of the page: http://bfgamerz.com/downloads.php?id=38&key=Project-Reality-v095-Full-Client It is also making the popup not working correctly (you have to be logged in to view it) but the popup is just like this: <script language="javascript" type="text/javascript"> function popup(url,title,height,width,extras){ var windowoptions = 'height=' + height + ',width=' + width + ',' + extras + ''; windoww = window.open(url,title,windowoptions); if (window.focus) {windoww.focus()} return false; } </script> Thanks for any help. Quote Link to comment https://forums.phpfreaks.com/topic/247808-jquery-working-in-firefox-but-not-ie9/ Share on other sites More sharing options...
nogray Posted September 25, 2011 Share Posted September 25, 2011 in IE9, hit F12 to get the developers tools which should show you where is the error. Quote Link to comment https://forums.phpfreaks.com/topic/247808-jquery-working-in-firefox-but-not-ie9/#findComment-1272509 Share on other sites More sharing options...
Guernica Posted September 27, 2011 Author Share Posted September 27, 2011 When I hit F12 and the debugger window opens the 3 items listed are as follows: SEC7115: :visited and :link styles can only differ by color. Some styles were not applied to :visited. bfgamerz.com SCRIPT5009: 'vBulletin_init' is undefined bfgamerz.com, line 980 character 2 SCRIPT438: Object doesn't support property or method 'observe' bfgamerz.com, line 986 character 1 Nothing about jQuery or javascript errors. How do I find out the problem with the debugger? Sorry I am new to this in IE. Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/247808-jquery-working-in-firefox-but-not-ie9/#findComment-1273076 Share on other sites More sharing options...
nogray Posted September 27, 2011 Share Posted September 27, 2011 SCRIPT5009: 'vBulletin_init' is undefined bfgamerz.com, line 980 character 2 you'll need to make sure it's defined, if not, remove it from your code. the consule will give you the line to look at. This error could be blocking the rest of the script. Quote Link to comment https://forums.phpfreaks.com/topic/247808-jquery-working-in-firefox-but-not-ie9/#findComment-1273095 Share on other sites More sharing options...
Guernica Posted September 27, 2011 Author Share Posted September 27, 2011 Okay I've cleared up the vbulletin errors and the footer snippets that were causing an error. Now I just have an error in my popup javascript function: function popup(url,title,height,width,extras){ var windowoptions = 'height=' + height + ',width=' + width + ',' + extras + ''; windoww = window.open(url,title,windowoptions); if (window.focus) {windoww.focus()} return false; } Says "invalid argument" in: windoww = window.open(url,title,windowoptions); Thanks for the help! Quote Link to comment https://forums.phpfreaks.com/topic/247808-jquery-working-in-firefox-but-not-ie9/#findComment-1273256 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.