Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. <span class=”content1″>
  2. Add your 1st page content here
  3. </span>
  4. <span class=”content2″ style=”display:none”>
  5. Add your 2nd page content here
  6. </span>
  7. <span class=”content3″ style=”display:none”>
  8. Add your 3rd page content here
  9. </span>
  10. <span class=”content4″ style=”display:none”>
  11. Add your 4th page content here
  12. </span>
  13.  
  14.  
  15.  
  16. <p><b>Pages: <span style=”color: #3d85c6;”>
  17. <a href=”#” class=”page1″>1</a>
  18. <a href=”#” class=”page2″>2</a>
  19. <a href=”#” class=”page3″>3</a>
  20. <a href=”#” class=”page4″>4</a></span></b></p>
  21.  
  22.  
  23.  
  24. <script src=”//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”></script>
  25. <script style=”text/javascript”>
  26. jQuery(document).ready(function(){
  27. jQuery(‘.page1’).click(function(){
  28. jQuery(‘.content1’).show();
  29. jQuery(‘.content2’).hide();
  30. jQuery(‘.content3’).hide();
  31. jQuery(‘.content4’).hide();
  32. return false;
  33. });
  34. jQuery(‘.page2’).click(function(){
  35. jQuery(‘.content1’).hide();
  36. jQuery(‘.content2’).show();
  37. jQuery(‘.content3’).hide();
  38. jQuery(‘.content4’).hide();
  39. return false;
  40. });
  41. jQuery(‘.page3’).click(function(){
  42. jQuery(‘.content1’).hide();
  43. jQuery(‘.content2’).hide();
  44. jQuery(‘.content3’).show();
  45. jQuery(‘.content4’).hide();
  46. return false;
  47. });
  48. jQuery(‘.page4’).click(function(){
  49. jQuery(‘.content1’).hide();
  50. jQuery(‘.content2’).hide();
  51. jQuery(‘.content3’).hide();
  52. jQuery(‘.content4’).show();
  53. return false;
  54. });
  55. });
  56. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement