sKunKbad Posted October 22, 2010 Share Posted October 22, 2010 I'm trying to pass some options over to the jquery superfish plugin, based on if the browser is IE7 or 8. I've asked elsewhere with no answer, so hoping somebody here can help. In the code below, I want to set animation and speed, but different values if IE7 or 8. Currently it breaks superfish: $(document).ready(function() { $('ul.sf-menu').supersubs({ minWidth: 12, maxWidth: 27, extraWidth: 1 }).superfish({ animation: (function(){ if ($.browser.msie && $.browser.version > 6){ return "{height:'show'}"; } else { return "{animation:'show'}"; } }), speed: (function(){ if ($.browser.msie && $.browser.version > 6){ return 'fast'; } else { return 'normal'; } }) }); $('.sf-menu > li a:not(li li a)').css({ '-moz-border-radius': '3px', '-webkit-border-radius': '3px', 'border-radius': '3px' }); }); I've been going around in circles with this for an hour or two. Any help is appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/216532-dynamic-superfish-menu-options-based-on-browser/ 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.