cycle/.html ~ replace photo/info


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $('#projectPhotos').cycle({
  2. fx: 'fade',
  3. speed: 200,
  4. sync: 0,
  5. timeout: 0
  6. });
  7.  
  8. function pOne() {
  9. $('#projectPhotos').cycle(0);
  10. $("#projectInfo").html("<p>copy here</p>");
  11. clearLinks();
  12. $('#pLink1').addClass("active");
  13. }
  14.  
  15. function pTwo() {
  16. $('#projectPhotos').cycle(1);
  17. $("#projectInfo").html("<p>copy here</p>");
  18. clearLinks();
  19. $('#pLink2').addClass("active");
  20. }
  21.  
  22.  
  23. function clearLinks() {
  24. $('#pLink1,#pLink2').removeClass("active");
  25. }
  26.  
  27. $(document).ready(function () {
  28. $('#pLink1').addClass('active');
  29. });
  30.  
  31.  
  32.  
  33.  
  34. <li id="pLink1"><a href="javascript:pOne();">link name</a></li>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.