Guest User

Untitled

a guest
Apr 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. <html>
  2. <head>
  3. <link rel="stylesheet" href="css/scroll.css" type="text/css" media="print">
  4. <script src="js/jquery.js"></script>
  5. <script>
  6. // execute your scripts when DOM is ready. this is a good habit
  7. $(function() {
  8.  
  9. // initialize scrollable
  10. $("div.scrollable").scrollable({
  11. vertical:true,
  12. size:10,
  13. clickable:false
  14.  
  15. // use mousewheel plugin
  16. }).mousewheel();
  17.  
  18. // get handle to scrollable API
  19. var api = $("div.scrollable").scrollable();
  20.  
  21. // append new item using jQuery's append() method
  22. for (i = 0 ; i < 30 ; i++) {
  23. api.getItemWrap().append(
  24. '<p>added'+i+'</p>'
  25. );
  26. }
  27.  
  28. api.reload().end();
  29. });
  30. </script>
  31. </head>
  32. <body>
  33.  
  34.  
  35. <div class="scrollable vertical">
  36.  
  37. <!-- root element for the items -->
  38. <div class="items">
  39.  
  40. </div>
  41.  
  42. </div>
  43.  
  44.  
  45. </body>
  46. </html>
Add Comment
Please, Sign In to add comment