List of My Projects

jQuery(document).ready(function ($) { /* Fixing About Section */ var elem1 = $(‘.row div.init-animate’).first(); elem1.removeClass(‘col-sm-6’); elem1.addClass(‘col-sm-4’); elem1.css(‘top’, ‘0px’); var elem2 = elem1.next(‘div’); elem2.removeClass(‘col-sm-6’); elem2.addClass(‘col-sm-8’); elem2.css(‘padding’, ’10px 0px 40px 0px’); /* /Fixing About Section */ /* Fixing Portfolio Section */ var portfolioSection = $(‘#portfolio_section’); var portfolioItems = portfolioSection.find(‘.at-gallery-item’); var index = 1; portfolioItems.each(function() { var portfolioItem = $(this); var pageUrl = portfolioItem.find(‘h3 a’).attr(‘href’); $.ajax({ type: ‘POST’, url: ‘/wp-admin/admin-ajax.php’, data: { action: ‘get_meta_description’, url: pageUrl }, success: function(response) { if (response.success) { portfolioItem.append(‘

‘ + response.data + ‘

‘); var parent = portfolioItem.closest(‘.fullwidth-row’); //alert(parent.find(‘:nth-child(4)’).css(‘top’)); switch (index) { case 1: case 11: // 5,8 parent.find(‘:nth-child(5)’).css(‘top’, parseInt(parent.find(‘:nth-child(5)’).css(‘top’)) + $(‘#projDesc’ + index).height() + ‘px’); parent.find(‘:nth-child(8)’).css(‘top’, parseInt(parent.find(‘:nth-child(8)’).css(‘top’)) + $(‘#projDesc’ + index).height() + ‘px’); break; case 2: case 12: // 10 parent.find(‘:nth-child(10)’).css(‘top’, parseInt(parent.find(‘:nth-child(10)’).css(‘top’)) + $(‘#projDesc’ + index).height() + ‘px’); break; case 3: case 13: // 6,9 parent.find(‘:nth-child(6)’).css(‘top’, parseInt(parent.find(‘:nth-child(6)’).css(‘top’)) + $(‘#projDesc’ + index).height() + ‘px’); parent.find(‘:nth-child(9)’).css(‘top’, parseInt(parent.find(‘:nth-child(9)’).css(‘top’)) + $(‘#projDesc’ + index).height() + ‘px’); break; case 4: case 14: // 7 parent.find(‘:nth-child(7)’).css(‘top’, parseInt(parent.find(‘:nth-child(7)’).css(‘top’)) + $(‘#projDesc’ + index).height() + ‘px’); break; case 5: case 15: // 8 parent.find(‘:nth-child(8)’).css(‘top’, parseInt(parent.find(‘:nth-child(8)’).css(‘top’)) + $(‘#projDesc’ + index).height() + ‘px’); break; case 6: case 16: // 9 parent.find(‘:nth-child(9)’).css(‘top’, parseInt(parent.find(‘:nth-child(9)’).css(‘top’)) + $(‘#projDesc’ + index).height() + ‘px’); break; } } else { console.log(‘Error: ‘ + response.data); console.log(‘URL: ‘ + pageUrl); } index++; }, error: function(xhr, status, error) { console.log(‘Ajax error: ‘ + error); console.log(‘URL: ‘ + pageUrl); index++; } }); }); /* /Fixing Portfolio Section */ });

See My Projects