html - How do I add left and slide effect for this basic image slider in jQuery? -


$(document).ready(function(){     $("#circle1").click(function(){         $(".headlines").css('background-image', 'url(bg.png)');     });      $("#circle2").click(function(){         $(".headlines").css('background-image', 'url(bg2.png)');     });      $("#circle3").click(function(){         $(".headlines").css('background-image', 'url(bg3.png)');     }); }); 

all #circle clickable circles make basic image slide. when click circle works want have slide effect. idea?

hope looking for. circles slide left. need change #circle .headliner accordingly in javascript.

$(document).ready(function() {    $("#circle1").click(function() {      $("#circle1").css('background-image', 'url(bg.png)').toggle("slide");    });      $("#circle2").click(function() {      $("#circle2").css('background-image', 'url(bg2.png)').toggle("slide");    });      $("#circle3").click(function() {      $("#circle3").css('background-image', 'url(bg3.png)').toggle("slide");    });  });
#circle1,  #circle2,  #circle3 {    width: 100px;    height: 100px;    background: red;    -moz-border-radius: 50px;    -webkit-border-radius: 50px;    border-radius: 50px;  }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>    <div id="circle1"></div>  <br />    <div id="circle2"></div>  <br />    <div id="circle3"></div>


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -