Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.load_more').on('click', function(event) {
- event.preventDefault();
- var $btn = $(this),
- currentHref = $btn.attr('href'),
- newHref = currentHref.replace(/\d/g, function(n){ return ++n }),
- idx = currentHref.match(/\d/g);
- if($btn.data('max') == idx){
- return;
- }
- $.ajax({
- url: currentHref
- }).done(function(data){
- $('#screens').append( data).isotope( 'reloadItems' ).isotope({ sortBy: 'original-order' });
- $(".piro_overlay").remove();
- $(".piro_html").remove();
- $("#imgCache").remove();
- $().piroBox_ext({
- piro_speed : 700,
- bg_alpha : 0.5,
- piro_scroll : true
- });
- $(' #screens > .screen a').each( function() { $(this).hoverdir({
- hoverDelay : 75
- }); } );
- $btn.attr('href', newHref);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement