Advertisement
Guest User

Untitled

a guest
Jul 10th, 2013
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. $('.load_more').on('click', function(event) {
  2. event.preventDefault();
  3.  
  4. var $btn = $(this),
  5. currentHref = $btn.attr('href'),
  6. newHref = currentHref.replace(/\d/g, function(n){ return ++n }),
  7. idx = currentHref.match(/\d/g);
  8.  
  9. if($btn.data('max') == idx){
  10. return;
  11. }
  12.  
  13.  
  14. $.ajax({
  15. url: currentHref
  16. }).done(function(data){
  17. $('#screens').append( data).isotope( 'reloadItems' ).isotope({ sortBy: 'original-order' });
  18.  
  19. $(".piro_overlay").remove();
  20. $(".piro_html").remove();
  21. $("#imgCache").remove();
  22. $().piroBox_ext({
  23. piro_speed : 700,
  24. bg_alpha : 0.5,
  25. piro_scroll : true
  26. });
  27.  
  28. $(' #screens > .screen a').each( function() { $(this).hoverdir({
  29. hoverDelay : 75
  30. }); } );
  31.  
  32. $btn.attr('href', newHref);
  33. });
  34.  
  35. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement