Created
February 11, 2014 07:46
-
-
Save sorrycc/8930711 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
initHotProduct:function() { | |
$("div.J_Product").each(function() { | |
var el = this; | |
var swipe = Swipe(el, { | |
auto: 30000, | |
callback: function(pos) { | |
bullets.removeClass("on"); | |
bullets[pos].className = "on"; | |
} | |
}); | |
var liEls = $(el).prev().find("li"); | |
liEls.on("click", function(e) { | |
liEls.removeClass("on"); | |
$(e.currentTarget).addClass("on"); | |
var index = liEls.indexOf(e.currentTarget); | |
swipe.slide(index, 200); | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment