Jump to content

Recommended Posts

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.