html - Slider Transform button into arrow -


could transform button of slider 2 arrows "next - previous" ?! in case have button each slide, had use 2 button, how can transform input in next , previous?! simple js or fix problem css?!

<div id="slider-wrapper">   <input type="radio" id="button-1" name="buttons" checked="checked"/>   <label for="button-1"></label>   <input type="radio" id="button-2" name="buttons"/>   <label for="button-2"></label>   <input type="radio" id="button-3" name="buttons"/>   <label for="button-3"></label>   <input type="radio" id="button-4" name="buttons"/>   <label for="button-4"></label>   <input type="radio" id="button-5" name="buttons"/>   <label for="button-5"></label>    <div id="slider">     <ul>       <li id="slide1">          <img src="images/img1.jpg" width="400" height="400" alt=""/> </li>         <li id="slide2">           <p>slider page two<br>             lorem ipsum dolor sit amet, consectetuer adipiscing elit. aenean commodo ligula eget dolor. aenean massa. cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. nulla consequat massa quis enim.</p>             </li>           <li id="slide3">             <p>slider page three<br>               lorem ipsum dolor sit amet, consectetuer adipiscing elit. aenean commodo ligula eget dolor. aenean massa. cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. nulla consequat massa quis enim.</p>               </li>             <li id="slide4">               <p>slider page four<br>                 lorem ipsum dolor sit amet, consectetuer adipiscing elit. aenean commodo ligula eget dolor. aenean massa. cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. nulla consequat massa quis enim.</p>                 </li>               <li id="slide5">                 <p>slider page five<br>                   lorem ipsum dolor sit amet, consectetuer adipiscing elit. aenean commodo ligula eget dolor. aenean massa. cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. nulla consequat massa quis enim.</p>                   </li>                 </ul>               </div>             </div> 

fiddle

http://jsfiddle.net/tmxp5/274/

thank .

using bit of jquery, i've come this, need bit more work instance stop when gets past last slider page. should use transform: translate3d() instead of left transition smoother, particularly on smartphones.

http://jsfiddle.net/tmxp5/275/

var left = 0;  $('#button-1').click(function() {     left = left + 100;     $('#slider ul').css({left: left + '%'}); });  $('#button-2').click(function() {     left = left - 100;     $('#slider ul').css({left: left + '%'}); }); 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -