I think it will be very difficult to find a plugin that exactly matches your code. But I could write you jQuery stuff. But then I would have two questions.
- How much of CSS can I change? Or should it also work without js activation?
- Are you left with 3 points in the future? Or do you want to dynamically change the number of slides?
// EDIT
OK, it works now. I know this is not very elegant, but I did not want to change too much code. So I just had to edit two of your css selectors (I commented out the old one). You also want to note that with this solution, your old method still works when javascript is disabled. JQuery code follows ...
$("div.one").css({"left":0, "opacity":1}); $("div.two").css({"left":300, "opacity":1}); $("div.three").css({"left":600, "opacity":1}); $("input#first").click(function(){ $("div.one").animate({left:0},600); $("div.two").animate({left:300},600); $("div.three").animate({left:600},600); }); $("input#second").click(function(){ $("div.one").animate({left:-300},600); $("div.two").animate({left:0},600); $("div.three").animate({left:300},600); }); $("input#third").click(function(){ $("div.one").animate({left:-600},600); $("div.two").animate({left:-300},600); $("div.three").animate({left:0},600); });β
jsfiddle.net/mYhEV/2/
Hope this helps.
PS: For a cleaner solution, you have to rethink a bit. One method is to put all the sliders in a shell and simply transfer that shell instead of moving it.
source share