jQuery content slider: Simplest
I'm l开发者_JS百科ooking to make the simplest content slider possible. I don't want a plugin... I simply want an easy way to slide a couple of divs left and right based on next/previous buttons.
If I'm shooting myself in the foot, though, I'll just use a plugin. :)
The easiest way I believe is to use the anaimate function on your elements:
$("#left").click(function(){
$(".block").animate({"left": "-=50px"}, "slow");
});
Look here for more info: http://api.jquery.com/animate/
精彩评论