Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(window).on('load',function(){
- var childHeight = [];
- if($(window).width() > 640) {
- $('.news-gallery').find('article').each(function() {
- childHeight.push($(this).outerHeight());
- console.log(childHeight);
- newChildHeight = Math.max.apply(Math, childHeight);
- $('article').css('height', parseInt(newChildHeight)+'px');
- });
- }
- else{
- $('.news-gallery').attr('style', ' '); }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement