jQuery(document).ready(function ($) {
if($.fn.vglacier_iso_sort) {
var $container = $(‘.img-boxes’);
$container.vglacier_iso_sort();
}
});
(function($) {
$.fn.vglacier_iso_sort = function(options) {
return this.each(function() {
var the_body = $(‘body’),
container = $(this),
portfolio_id = container.data(‘portfolio-id’),
filter = container.parent().find(‘.filters[data-portfolio-id=”‘ + portfolio_id + ‘”]’),
imgParent = container.find(‘.object-non-visible’);
function applyIso()
{
container.isotope({
layoutMode : ‘masonry’,
itemSelector : ‘.isotope-item’,
transitionDuration: ‘0.6s’,
filter: “*”
}, function()
{
container.css({overflow:’visible’});
// the_body.trigger(‘av_resize_finished’);
});
// filter items on button click
filter.on(‘click’, ‘ul.nav li a’, function () {
var filterValue = $(this).attr(‘data-filter’);
$(“.filters”).find(“li.active”).removeClass(“active”);
$(this).parent().addClass(“active”);
container.isotope({filter: filterValue});
return false;
});
};
// update columnWidth on window resize
$(window).on( ‘debouncedresize’, function()
{
applyIso();
});
$.vglacier_utilities.preload({container: container, single_callback: function() {
applyIso();
}
});
});
}
})(this.jQuery);
All
Education
Hi-Tech
Housing
Industrial
Offices
Service Express
Sandy High School
Science Research & Teaching Center
Data Centers
Millennium Tower
MySalon Suite
EverGreen Office Park
World Wide Business Center
Housing, Industrial
jQuery(document).ready(function ($) {
$(‘.vglacier-portfolio-load-more’).click(function(e) {
e.preventDefault();
var current = $(this),
data = current.data(),
loader = $(“.spinner”)
//calculate a new offset
if ( !data.offset ) {
data.offset = 0;
}
data.offset += data.items;
data.action = ‘vglacier_ajax_portfolio_more’;
$.ajax({
url: “https://mp-costruzioni.com/wp-admin/admin-ajax.php”,
type: “POST”,
data:data,
beforeSend: function()
{
current.hide();
loader.show();
},
success: function(response)
{
if(response.indexOf(“{vglacier_ajax_portfolio_more}”) !== -1) {
//fetch the response. if any php warnings were displayed before rendering of the items the are removed by the string split
var response = response.split(‘{vglacier_ajax_portfolio_more}’),
new_items = $(response.pop()).filter(‘.isotope-item’);
if(new_items.length < data.items)
{
current.remove();
}
var $container = $('.isotope-container-59fb060aa62bc');
var $newElems = $(new_items);
$newElems.imagesLoaded( function() {
$container.isotope('insert', $newElems).fadeIn();
});
}
},
error: function()
{
current.show();
loader.hide();
},
complete: function()
{
current.show();
loader.hide();
}
});
});
});
load more