1//For load more functionality 2jQuery(document).ready(function () { 3 4 if (jQuery('.chosen-select').length > 0) { 5 var config = { 6 '.chosen-select': {}, 7 '.chosen-select-deselect': {allow_single_deselect: true}, 8 '.chosen-select-no-single': {disable_search_threshold: 10}, 9 '.chosen-select-no-results': {no_results_text: 'Oops, nothing found!'}, 10 '.chosen-select-width': {width: "95%"} 11 } 12 jQuery(".chosen-select").chosen(); 13 } 14 15 var $previous_height = jQuery('.bdp_single .navigation.post-navigation .nav-links .nav-previous').outerHeight(); 16 var $next_height = jQuery('.bdp_single .navigation.post-navigation .nav-links .nav-next').outerHeight(); 17 if ($previous_height > $next_height) { 18 jQuery('.bdp_single .navigation.post-navigation .nav-links .nav-next').css('min-height', $previous_height); 19 jQuery('.bdp_single .navigation.post-navigation .nav-links .nav-previous').css('min-height', $previous_height); 20 } else if ($previous_height < $next_height) { 21 jQuery('.bdp_single .navigation.post-navigation .nav-links .nav-next').css('min-height', $next_height); 22 jQuery('.bdp_single .navigation.post-navigation .nav-links .nav-previous').css('min-height', $next_height); 23 } 24 25 if (jQuery('.flexslider').length > 0) { 26 jQuery('.flexslider').flexslider({ 27 animation: "slide", 28 controlNav: false, 29 prevText: "", 30 nextText: "" 31 }); 32 } 33 34 jQuery('#bdp-filer-change select').on('change', function () { 35 var template = jQuery('#blog_template').val(); 36 if (template == 'invert-grid') { 37 jQuery('.bdp-row').html(''); 38 } else if (template == 'news') { 39 jQuery('.news-wrapper').remove(); 40 } else if (template == 'brit_co') { 41 jQuery('.brit_co.bdp_brit_co').html(''); 42 } else { 43 var min_height = jQuery('.logbook.flatLine').height(); 44 jQuery('.logbook.flatLine').css('min-height', min_height); 45 jQuery('.logbook.flatLine').append('<div class="bdp_logbook_loader"></div>'); 46 } 47 jQuery('.wl_pagination_box').hide(); 48 jQuery('.bdp-load-more').hide(); 49 var $this = jQuery(this).val(); 50 jQuery.ajax({ 51 url: ajaxurl, 52 type: 'POST', 53 data: 'action=filter_change&' + jQuery('#bdp-filer-change').serialize(), 54 cache: false, 55 success: function (response) { 56 if (template == 'invert-grid') { 57 jQuery('.bdp-row').append(response); 58 } else if (template == 'news') { 59 jQuery('.bdp_wrapper').prepend(response); 60 } else if (template == 'brit_co') { 61 jQuery('.brit_co.bdp_brit_co').append(response); 62 bdp_get_brit_co_height(); 63 } else { 64 var jsmasonry = jQuery(".logbook.flatLine.flatNav.flatButton"); 65 jsmasonry.html(response); 66 jQuery(".my_logbook").logbook({ 67 levels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 68 showYears: 10, 69 del: 130, 70 vertical: false, 71 isPostLink: false, 72 isYears: false, 73 triggerWidth: 800, 74 itemMargin: parseInt(jQuery('#blog_itemMargin').val()), 75 customSize: { 76 "sheet": {"itemWidth": jQuery('#blog_itemWidth').val(), "itemHeight": jQuery('#blog_itemHeight').val(), "margin": jQuery('#blog_itemMargin').val()}, 77 "active": {"itemWidth": jQuery('#blog_itemWidth').val(), "itemHeight": jQuery('#blog_itemHeight').val(), "imageHeight": "150"} 78 }, 79 id: 10, 80 easing: jQuery('#blog_easing').val(), 81 enableSwipe: true, 82 startFrom: 'first', 83 enableYears: true, 84 class: { 85 readMore: '.lb-read-more', 86 }, 87 hideLogbook: (jQuery('#blog_hideLogbook').val() == 1) ? true : false,
88 hideArrows: false, 89 closeItemOnTransition: false, 90 autoplay: (jQuery('#blog_autoplay').val() == 1) ? true : false, 91 scrollSpeed: parseInt(jQuery('#blog_scrollSpeed').val()), 92 }); 93 94 //For Cool Horizontal Template 95 var maxHeight = Math.max.apply(null, jQuery('.horizontal .post-title').map(function () { 96 return jQuery(this).height(); 97 }).get()); 98 jQuery('.horizontal .post-title').css('min-height', maxHeight + 70); 99 100 var maxHeight = Math.max.apply(null, jQuery('.horizontal .post_content_wrap').map(function () { 101 return jQuery(this).height(); 102 }).get()); 103 jQuery('.horizontal .post_content_wrap').css('min-height', Math.round(maxHeight)); 104 105 var maxHeight = Math.max.apply(null, jQuery('.horizontal .post_hentry').map(function () { 106 return jQuery(this).height(); 107 }).get()); 108 jQuery('.horizontal .post_hentry').css('min-height', Math.round(maxHeight)); 109 110 var maxHeight = Math.max.apply(null, jQuery('.horizontal .post-content-area .post_wrapper').map(function () { 111 return jQuery(this).height(); 112 }).get()); 113 jQuery('.horizontal .post-content-area .post_wrapper').css('min-height', Math.round(maxHeight)); 114 115 jQuery('.logbook.flatLine').css('min-height', ''); 116 } 117 118 if ($this == null) { 119 jQuery('.wl_pagination_box').show(); 120 jQuery('.bdp-load-more').show(); 121 } 122 } 123 }); 124 }); 125 126 //For Overlay Horizontal Template 127 var maxHeight = Math.max.apply(null, jQuery('.overlay_horizontal .post_hentry').map(function () { 128 return jQuery(this).height(); 129 }).get()); 130 if (maxHeight == 0) { 131 maxHeight = '420'; 132 } 133 jQuery('.logbook .lb-item .post-image img').css('min-height', Math.round(maxHeight)); 134 jQuery('.logbook .lb-item .post-image').css('min-height', Math.round(maxHeight)); 135 136 //For Cool Horizontal Template 137 var maxHeight = Math.max.apply(null, jQuery('.horizontal .post-title').map(function () { 138 return jQuery(this).height(); 139 }).get()); 140 jQuery('.horizontal .post-title').css('min-height', maxHeight + 70); 141 142 var maxHeight = Math.max.apply(null, jQuery('.horizontal .post_content_wrap').map(function () { 143 return jQuery(this).height(); 144 }).get()); 145 jQuery('.horizontal .post_content_wrap').css('min-height', Math.round(maxHeight)); 146 147 var maxHeight = Math.max.apply(null, jQuery('.horizontal .post_hentry').map(function () { 148 return jQuery(this).height(); 149 }).get()); 150 jQuery('.horizontal .post_hentry').css('min-height', Math.round(maxHeight)); 151 152 var maxHeight = Math.max.apply(null, jQuery('.horizontal .post-content-area .post_wrapper').map(function () { 153 return jQuery(this).height(); 154 }).get()); 155 jQuery('.horizontal .post-content-area .post_wrapper').css('min-height', Math.round(maxHeight)); 156 157 //For load more functionality 158 function bdp_load_onscroll_ajax() { 159 var paged = parseInt(jQuery('#bdp-load-more-hidden #paged').val()); 160 var $timeline_year = jQuery('#bdp-load-more-hidden #timeline_previous_year').val(); 161 paged = paged + 1; 162 var max_num_pages = parseInt(jQuery('#bdp-load-more-hidden #max_num_pages').val()); 163 jQuery('.bdp-load-more-btn').addClass('loading'); 164 this_year = jQuery('#bdp-load-more-hidden #this_year').val(); 165 jQuery('.bdp-load-more-btn').fadeOut(); 166 if (paged <= max_num_pages) { 167 jQuery('.loading-image').fadeIn(); 168 jQuery.ajax({ 169 url: ajaxurl, 170 type: 'POST', 171 data: 'action=get_load_onscroll_blog&' + jQuery('#bdp-load-more-hidden').serialize(), 172 cache: false, 173 success: function (response) { 174 var jsmasonry = jQuery(".bdp-load-onscroll-pre").find("div"); 175 jQuery(window).bind('scroll', bdp_animate_elems); 176 // loop through each item to check when it animates 177 178 if (jsmasonry.hasClass('bdp-js-masonry')) {
179 if (jQuery('.bdp-js-masonry.masonry').hasClass('bdp_glossary') || jQuery('.bdp-js-masonry.masonry').hasClass('bdp_boxy')) { 180 jQuery('.bdp-js-masonry.masonry').append(response); 181 jQuery('.bdp-js-masonry.masonry').imagesLoaded(function () { 182 jQuery('.bdp-js-masonry.masonry').masonry('reloadItems').masonry('layout').masonry(); 183 }); 184 } else { 185 jQuery('.bdp-js-masonry.masonry').append(response); 186 jQuery(".bdp-js-masonry.masonry").append(response).masonry('reload'); 187 } 188 } else if (jsmasonry.hasClass('timeline_bg_wrap')) { 189 jQuery('div.timeline_back').append(response); 190 var only_year = jQuery('div.timeline_back').find('.timeline_year .only_year'); 191 jQuery(only_year).each(function () { 192 $timeline_year = jQuery(this).text(); 193 }); 194 jQuery('#bdp-load-more-hidden #timeline_previous_year').val(jQuery.trim($timeline_year)); 195 } else if (jsmasonry.hasClass('bdp-grid-row')) { 196 jQuery('div.bdp-grid-row').append(response); 197 bdp_explore_content_center() 198 } 199 else if (jsmasonry.hasClass('story')) { 200 jQuery('div.bdp-load-onscroll-pre .bdp_template.story').append(response); 201 var $get_year = this_year; 202 jQuery(response).find('.year-number').each(function () { 203 if (jQuery(this).html() != '') { 204 $get_year = jQuery(this).html(); 205 } 206 }); 207 jQuery('#bdp-load-more-hidden #this_year').val(jQuery.trim($get_year)); 208 } else if (jsmasonry.hasClass('boxy-clean')) { 209 jQuery('.blog_template.boxy-clean > ul').append(response); 210 bdp_get_boxy_clean_height(); 211 } else if (jsmasonry.hasClass('brit_co')) { 212 jQuery('div.bdp-load-onscroll-pre div.brit_co.bdp_brit_co').append(response); 213 bdp_get_brit_co_height(); 214 } else if (jsmasonry.hasClass('easy-timeline-wrapper')) { 215 jQuery('.easy-timeline-wrapper .easy-timeline').append(response); 216 easy_timeline_effects(); 217 } else if (jsmasonry.hasClass('my_diary_wrapper')) { 218 jQuery('.bdp-load-onscroll-pre .my_diary_wrapper').append(response); 219 } else if (jsmasonry.hasClass('elina_wrapper')) { 220 jQuery('.bdp-load-onscroll-pre .elina_wrapper').append(response); 221 social_share_div(); 222 } else if (jsmasonry.hasClass('masonry_timeline_wrapper')) { 223 jQuery('.bdp-load-onscroll-pre .masonry_timeline_wrapper').append(response); 224 masonry_timeline_fun(); 225 } else if (jsmasonry.hasClass('invert-grid')) { 226 jQuery('div.bdp-load-onscroll-pre .invert-grid-wrapper').append(response); 227 } else if (jsmasonry.hasClass('brite-wrapp')) { 228 jQuery('div.bdp-load-onscroll-pre .brite-wrapp').append(response); 229 } else if (jsmasonry.hasClass('media-grid')) { 230 jQuery('div.bdp-load-onscroll-pre .media-grid-wrapper').append(response); 231 } else if (jsmasonry.hasClass('chapter')) { 232 jQuery('div.bdp-load-onscroll-pre .bdp-row').append(response); 233 } else { 234 jQuery('div.bdp-load-onscroll-pre').append(response); 235 } 236 237 jQuery('.bdp-load-more-btn').removeClass('loading'); 238 jQuery('.loading-image').fadeOut();
239 jQuery('.bdp-load-more-btn').fadeIn(); 240 jQuery('div.bdp-load-onscroll').show(); 241 jQuery('#bdp-load-more-hidden #paged').val(paged); 242 if (paged == max_num_pages) 243 jQuery('.bdp-load-more-btn').fadeOut(); 244 jQuery('.flexslider').flexslider({ 245 animation: "slide", 246 controlNav: false, 247 prevText: "", 248 nextText: "" 249 }); 250 } 251 }); 252 } 253 return false; 254 } 255 //For load more functionality 256 jQuery(".bdp-load-more-btn").click(function () { 257 bdp_load_more_ajax(); 258 }); 259 jQuery(".bdp-load-onscroll-btn").click(function () { 260 var $select_value = jQuery('#bdp-filer-change select').val(); 261 if ($select_value == null) { 262 bdp_load_onscroll_ajax(); 263 } 264 }); 265 var ajax_window = jQuery(window); 266 ajax_window.bind("scroll touchstart", function () { 267 if (jQuery('a.bdp-load-onscroll-btn').length >= 1) { 268 var content_offset = jQuery('a.bdp-load-onscroll-btn').offset(); 269 var top = Math.round(content_offset.top - jQuery(window).height()); 270 if (jQuery(window).scrollTop() >= top) { 271 if (jQuery('div.bdp-load-onscroll').is(':visible')) { 272 jQuery('div.bdp-load-onscroll').hide(); 273 jQuery('.bdp-load-onscroll-btn').trigger('click'); 274 } 275 } 276 } 277 }); 278 jQuery(function () { 279 var elems = jQuery('.animateblock'); 280 var winheight = jQuery(window).height(); 281 var fullheight = jQuery(document).height(); 282 elems.each(function () { 283 var elm = jQuery(this); 284 var topcoords = elm.offset().top; 285 if (topcoords < winheight) { 286 // animate when top of the window is 3/4 above the element 287 elm.addClass('animated'); 288 elm.removeClass('animateblock'); 289 } 290 }); 291 292 jQuery('.timeline').each(function () { 293 if (jQuery(this).offset().top < winheight) 294 { 295 var width = jQuery(this).attr('data-width'); 296 jQuery(this).animate({ 297 width: width 298 }, 1000); 299 } 300 }); 301 302 jQuery(window).scroll(function () { 303 bdp_animate_elems(); 304 }); 305 306 }); 307 jQuery(document).on('click', '.bdp-wrapper-like .bdp-like-button', function (e) { 308 e.preventDefault(); 309 var button = jQuery(this); 310 var post_id = jQuery(this).attr('data-post-id'); 311 var security = jQuery(this).attr('data-nonce'); 312 var allbuttons;
313 allbuttons = jQuery('.bdp-button-' + post_id); 314 var loader = allbuttons.next('#bdp-loader'); 315 if (post_id !== '') { 316 jQuery.ajax({ 317 type: 'POST', 318 url: ajaxurl, 319 data: { 320 action: 'get_bdp_process_posts_like', 321 post_id: post_id, 322 nonce: security 323 }, 324 beforeSend: function () { 325 loader.html('<div class="loader"><i class="fa fa-spinner fa-pulse fa-1x fa-fw"></i></div>'); 326 }, 327 success: function (response) { 328 var icon = response.icon; 329 var count = response.count; 330 allbuttons.html(icon + count); 331 if (response.status === 'unliked') { 332 var like_text = ajax_object.like; 333 allbuttons.prop('title', like_text); 334 allbuttons.removeClass('liked'); 335 } else { 336 var unlike_text = ajax_object.unlike; 337 allbuttons.prop('title', unlike_text); 338 allbuttons.addClass('liked'); 339 } 340 loader.empty(); 341 } 342 }); 343 344 } 345 return false; 346 }); 347}); 348 349jQuery(function () { 350 easy_timeline_effects(); 351 social_share_div(); 352 masonry_timeline_fun(); 353}); 354 355function social_share_div() { 356 357 var maxWidth = Math.max.apply(null, jQuery('.post-media').map(function () { 358 return jQuery(this).width(); 359 }).get()); 360 maxWidth = (maxWidth / 2) + 10; 361 var cusstyle = '<style> .post-content-area:before { border-left-width: ' + Math.round(maxWidth) + 'px; } .post-media:before { border-right-width: ' + Math.round(maxWidth) + 'px; } .post-media:after { border-left-width: ' + Math.round(maxWidth) + 'px; } </style>' 362 jQuery('head').append(cusstyle); 363 364 var previous_post_height = jQuery('.elina .nav-links .previous-post').height(); 365 var next_post_height = jQuery('.elina .nav-links .next-post').height(); 366 if (previous_post_height < next_post_height) { 367 jQuery('.elina .nav-links .previous-post').css('min-height', next_post_height); 368 } else { 369 jQuery('.elina .nav-links .next-post').css('min-height', previous_post_height); 370 } 371 372 jQuery('.elina-footer').find('.social-component').append("<div class='social-share social-close-btn'><a class='close-div'title='close' href='javascript:void(0)'>x</a></div>"); 373 374 jQuery('.post-share-div > a.post-share').click(function () { 375 jQuery(this).parents('.elina-footer').find('.social-component').addClass('open-content'); 376 jQuery(this).parents('.elina-footer').find('.social-component > .social-share').addClass('add-eff'); 377 }); 378 379 jQuery('.social-share a.close-div').click(function () { 380 jQuery(this).parents('.elina-footer').find('.social-component').removeClass('open-content'); 381 jQuery(this).parents('.elina-footer').find('.social-component > .social-share').removeClass('add-eff'); 382 }); 383 384 jQuery('.elina.bdp_archive').find('.author-avatar-div').append('<div class="fakegb"></div>'); 385} 386 387 388function masonry_timeline_fun() { 389 jQuery('.masonry-timeline-wrapp .post-footer').find('.social-component').append("<div class='social-share social-close-btn'><a class='close-div'title='close' href='javascript:void(0)'>x</a></div>"); 390 391 jQuery('.masonry-timeline-wrapp .post-footer').each(function () { 392 393 var social_icon_height = jQuery(this).find('.social-component').outerHeight(); 394 var read_more_div_height = jQuery(this).find('.read-more-div').outerHeight(); 395 var metabox_height = jQuery(this).find('.metadatabox').outerHeight(); 396 397 var max_height = Math.max(social_icon_height, metabox_height + read_more_div_height); 398 jQuery(this).css("max-height", max_height + 2); 399 400 }); 401 402 jQuery('.masonry-timeline-wrapp .post-footer a.post-share').click(function () { 403 jQuery(this).parents('.post-footer').find('.social-component').addClass('open-content'); 404 jQuery(this).parents('.post-footer').find('.metadatabox').css('opacity', 0); 405 406 var social_icon_height = jQuery(this).parents('.post-footer').find('.social-component').outerHeight(); 407 var metabox_height = jQuery(this).parents('.post-footer').find('.metadatabox').outerHeight(); 408 var transform_css = 'translateY(-' + (metabox_height - 1) + 'px)'; 409 jQuery(this).parents('.post-footer').find('.social-component').css('transform', transform_css); 410 jQuery(this).parents('.post-footer').find('.social-component').css('opacity', 1); 411 412 }); 413 jQuery('.masonry-timeline-wrapp .post-footer a.close-div').click(function () { 414 //jQuery(this).parents('.social-component').removeClass('open-content'); 415 jQuery(this).parents('.post-footer').find('.metadatabox').removeAttr("style"); 416 jQuery(this).parents('.post-footer').find('.social-component').removeAttr("style"); 417 }); 418} 419 420function easy_timeline_effects() { 421 var effect = jQuery('.easy-timeline').attr('data-effect'); 422 jQuery('.easy-timeline li').each(function () { 423 if (jQuery(this).offset().top >
423 jQuery(window).scrollTop() + jQuery(window).height() * 0.75) { 424 jQuery(this).addClass('is-hidden'); 425 } else { 426 jQuery(this).addClass(effect); 427 } 428 }); 429 430 jQuery(window).on('scroll', function () { 431 jQuery('.easy-timeline li').each(function () { 432 if ((jQuery(this).offset().top <= (jQuery(window).scrollTop() + jQuery(window).height() * 0.75)) && jQuery(this).hasClass("is-hidden")) { 433 jQuery(this).removeClass("is-hidden").addClass(effect); 434 } 435 }); 436 }); 437} 438 439 440/*----------- code to apply same height to all template 4 li ---------------*/ 441function bdp_get_boxy_clean_height() { 442 443 var divs = jQuery(".boxy-clean li.blog_wrap").not('.first_post'); 444 var column = 4; 445 if (divs.hasClass('three_column')) { 446 column = 3; 447 } else if (divs.hasClass('two_column')) { 448 column = 2; 449 } 450 for (var i = 0; i < divs.length; i += column) { 451 452 var heights = jQuery(".boxy-clean li.blog_wrap").not('.first_post').slice(i, i + column).map(function () { 453 return jQuery(this).height(); 454 }).get(); 455 var maxHeight = Math.max.apply(null, heights); 456 if (screen.width > 640) { 457 jQuery(".boxy-clean li.blog_wrap").not('.first_post').slice(i, i + column).css('height', maxHeight + 50); 458 } 459 } 460} 461/*----------- code to apply same height to all template 4 li end ---------------*/ 462 463 464function bdp_animate_elems() { 465 var elems = jQuery('.animateblock'); 466 var winheight = jQuery(window).height(); 467 var wintop = jQuery(window).scrollTop(); // calculate distance from top of window 468 469 // loop through each item to check when it animates 470 elems.each(function () { 471 var elm = jQuery(this); 472 if (elm.hasClass('animated')) { 473 return true; 474 } // if already animated skip to the next item 475 var topcoords = elm.offset().top; // element's distance from top of page in pixels 476 if (wintop > (topcoords - (winheight * 0.6))) { 477 // animate when top of the window is 3/4 above the element 478 elm.addClass('animated'); 479 elm.removeClass('animateblock'); 480 } 481 }); 482 jQuery('.timeline').each(function () { 483 if (wintop > jQuery(this).offset().top - winheight) 484 { 485 var width = jQuery(this).attr('data-width'); 486 jQuery(this).animate({ 487 width: width 488 }, 500); 489 } 490 }); 491} 492//For load more functionality 493function bdp_load_more_ajax() { 494 495 var paged = parseInt(jQuery('#bdp-load-more-hidden #paged').val()); 496 var this_year = jQuery('#bdp-load-more-hidden #this_year').val(); 497 var $timeline_year = jQuery('#bdp-load-more-hidden #timeline_previous_year').val(); 498 paged = paged + 1; 499 var max_num_pages = parseInt(jQuery('#bdp-load-more-hidden #max_num_pages').val()); 500 jQuery('.bdp-load-more-btn').addClass('loading'); 501 jQuery('.bdp-load-more-btn').fadeOut(); 502 jQuery('.loading-image').fadeIn(); 503 if (paged <= max_num_pages) { 504 jQuery.ajax({ 505 url: ajaxurl, 506 type: 'POST', 507 data: 'action=get_loadmore_blog&' + jQuery('#bdp-load-more-hidden').serialize(), 508 cache: false, 509 success: function (response) { 510 var jsmasonry = jQuery(".bdp-load-more-pre").find("div"); 511 jQuery(window).bind('scroll', bdp_animate_elems); 512 // loop through each item to check when it animates 513 514 if (jsmasonry.hasClass('bdp-js-masonry')) { 515 if (jQuery('.bdp-js-masonry.masonry').hasClass('bdp_glossary') || jQuery('.bdp-js-masonry.masonry').hasClass('bdp_boxy')) { 516 jQuery('.bdp-js-masonry.masonry').append(response); 517 jQuery('.bdp-js-masonry.masonry').imagesLoaded(function () { 518 jQuery('.bdp-js-masonry.masonry').masonry('reloadItems').masonry('layout').masonry(); 519 }); 520 } else { 521 jQuery('.bdp-js-masonry.masonry').append(response); 522 jQuery(".bdp-js-masonry.masonry").append(response).masonry('reload'); 523 } 524 } else if (jsmasonry.hasClass('timeline_bg_wrap')) { 525 jQuery('div.timeline_back').append(response); 526 var only_year = jQuery('div.timeline_back').find('.timeline_year .only_year'); 527 jQuery(only_year).each(function () { 528 $timeline_year = jQuery(this).text(); 529 }); 530 jQuery('#bdp-load-more-hidden #timeline_previous_year').val(jQuery.trim($timeline_year)); 531 } 532 else if (jsmasonry.hasClass('story')) { 533 jQuery('div.bdp_template.story').append(response); 534 var $get_year = this_year; 535 jQuery(response).find('.year-number').each(function () { 536 if (jQuery(this).html() != '') { 537 $get_year = jQuery(this).html(); 538 } 539 }); 540 jQuery('#bdp-load-more-hidden #this_year').val(jQuery.trim($get_year)); 541 }
541 else if (jsmasonry.hasClass('bdp-grid-row')) { 542 jQuery('div.bdp-grid-row').append(response); 543 bdp_explore_content_center() 544 } else if (jsmasonry.hasClass('boxy-clean')) { 545 jQuery('.blog_template.boxy-clean > ul').append(response); 546 bdp_get_boxy_clean_height(); 547 } else if (jsmasonry.hasClass('brit_co')) { 548 jQuery('div.bdp-load-more-pre div.brit_co.bdp_brit_co').append(response); 549 bdp_get_brit_co_height(); 550 } else if (jsmasonry.hasClass('easy-timeline-wrapper')) { 551 jQuery('div.bdp-load-more-pre div.easy-timeline-wrapper .easy-timeline').append(response); 552 easy_timeline_effects(); 553 } else if (jsmasonry.hasClass('my_diary_wrapper')) { 554 jQuery('.bdp-load-more-pre .my_diary_wrapper').append(response); 555 } else if (jsmasonry.hasClass('elina_wrapper')) { 556 jQuery('.bd
556p-load-more-pre .elina_wrapper').append(response); 557 social_share_div(); 558 } else if (jsmasonry.hasClass('masonry_timeline_wrapper')) { 559 jQuery('.bdp-load-more-pre .masonry_timeline_wrapper').append(response); 560 masonry_timeline_fun(); 561 } else if (jsmasonry.hasClass('invert-grid')) { 562 jQuery('div.bdp-load-more-pre .invert-grid-wrapper').append(response); 563 } else if (jsmasonry.hasClass('brite-wrapp')) { 564 jQuery('.bdp-load-more-pre .brite-wrapp').append(response); 565 } else if (jsmasonry.hasClass('media-grid')) { 566 jQuery('dp-load-more-pre .media-grid-wrapper').append(response); 567 } else if (jsmasonry.hasClass('chapter')) { 568 jQuery('.bdp-load-more-pre .bdp-row').append(response); 569 } else { 570 jQuery('div.bdp-load-more-pre').append(response); 571 } 572 573 jQuery('.bdp-load-more-btn').removeClass('loading'); 574 jQuery('.loading-image').fadeOut(); 575 jQuery('.bdp-load-more-btn').fadeIn(); 576 jQuery('#bdp-load-more-hidden #paged').val(paged); 577 if (paged == max_num_pages) 578 jQuery('.bdp-load-more-btn').fadeOut(); 579 jQuery('.flexslider').flexslider({ 580 animation: "slide", 581 controlNav: false, 582 prevText: "", 583 nextText: "" 584 }); 585 } 586 }); 587 } 588 return false; 589} 590 591jQuery(window).load(function () { 592 if (jQuery('.masonry').length > 0) { 593 setTimeout(function () { 594 jQuery('.masonry').imagesLoaded(function () { 595 jQuery('.masonry').masonry({ 596 columnWidth: 0, 597 itemSelector: '.blog_masonry_item', 598 isResizable: true 599 }); 600 }); 601 }, 500); 602 } 603 bdp_get_boxy_clean_height(); 604 bdp_get_brit_co_height(); 605 bdp_explore_content_center(); 606}); 607 608function bdp_explore_content_center() {
609 var main_height = jQuery('.bdp_blog_template.explore').height(); 610 jQuery(".grid-overlay").each(function () { 611 var overlay = jQuery(this).find('.blog_header').height(); 612 var padd = main_height - overlay; 613 var padding = padd / 2; 614 jQuery(this).css('padding-top', padding); 615 jQuery(this).css('padding-bottom', padding); 616 617 }); 618} 619function bdp_get_brit_co_height() { 620 var heights = jQuery(".image_wrapper").map(function () 621 { 622 return jQuery(this).height(); 623 }).get(), 624 maxHeight = Math.max.apply(null, heights); 625 var content_heights = jQuery(".content_wrapper").map(function () 626 { 627 return jQuery(this).height(); 628 }).get(), 629 content_height = Math.max.apply(null, content_heights); 630 jQuery('.britco').each(function () { 631 var total_height = maxHeight + content_height + 30; 632 jQuery(this).find('.bdp_blog_wraper').height(total_height); 633 }); 634}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.