'use strict'; $(function () { $.ajax({ async : false, cache : false }); $(document).on('mouseover', '#team-grid .span3', function() { $(this).siblings().css('opacity', '0.3'); return $(this).parent().siblings().css('opacity', '0.3'); }); $(document).on('mouseleave', '#team-grid .span3', function() { $(this).siblings().css('opacity', '1'); return $(this).parent().siblings().css('opacity', '1'); }); $(document).on('click', '.pagination a', function (event) { goToPage(this); }); $('.pagination a').on('click', function (event) { goToPage(this); }); var goToPage = function (pageLink) { var page = $(pageLink).data('page'); if(page){ $.get('/cariere/our-world/our-team/?page=' + page).done(function (data) { updatePageContent(data); }); } }; var updatePageContent = function (data) { $('#team-grid').html($(data).find('#team-grid').children()); $('.listing-footer').html($(data).find('.listing-footer').children()); $.scrollTo($(".breadcrumb").next(), {duration : 200}); }; });