Created
August 24, 2015 14:56
-
-
Save surjithctly/c8c7775f34e925d64782 to your computer and use it in GitHub Desktop.
Features Rotator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*http://good.co/*/ | |
$(document).ready(function (){ | |
// If menu item has classname "nav-no-click" then return false | |
$('li.nav-no-click > a').click( function() { | |
return false; | |
}); | |
$('#features-rotator-row').find('.features-rotator-item').each(function(index, element) { | |
$(element).mouseover(function(e) { | |
$('#features-rotator').trigger( 'slideTo', [index, 0, true] ); | |
$('#features-rotator').trigger('pause', true); | |
return false; | |
}); | |
$(element).mouseout(function(e) { | |
$('#features-rotator').trigger('play'); | |
return false; | |
}); | |
}); | |
$('#features-rotator').carouFredSel({ | |
items : 1, | |
scroll : { | |
items : 1, | |
fx : 'cover', | |
easing : "elastic", | |
duration : 0, | |
onBefore : function() { | |
var pos = $(this).triggerHandler( 'currentPosition' ); | |
$('#features-rotator-row .features-rotator-item').css('opacity', 1); | |
$('#features-rotator-row .features-rotator-item').find('.features-item-icon-active').css('display', 'none'); | |
$('#features-rotator-row .features-rotator-item').find('.features-item-icon-noactive').css('display', 'block'); | |
$('#features-rotator-row').find('.features-rotator-item').eq(pos).find('.features-item-icon-active').css('display', 'block'); | |
$('#features-rotator-row').find('.features-rotator-item').eq(pos).find('.features-item-icon-noactive').css('display', 'none'); | |
} | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment