javascript - Using jquery to slide automatically depending on different ids -


i have 2 dots different ids. each id associated images. if click dot, images changed. now, want add slide within 5 minutes change dot dot using auto click function of jquery. tried creating many times couldn't it. please me kindly.

$(document).ready(function(){      $('#dot1,#dot2').click(function(){         var id = this.id;         console.log("id is->",id);          if(id=="#dot1"){             $("#dot1").hasclass('current');              settimeout(function() {                 $('#dot2').trigger('click');             }, 4e3);         }          if(id=="#dot2"){             $("#dot2").hasclass('current');              settimeout(function() {                 $('#dot1').trigger('click');             }, 4e3);         }     }); });  


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -