Custom Headers: Ensure the ready event fires before fetching the existing headers to apply jQuery.masonry. see #20346, #21820.
git-svn-id: https://develop.svn.wordpress.org/trunk@22504 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
db0ad6a120
commit
c4b070dd07
|
@ -1,10 +1,13 @@
|
|||
(function($) {
|
||||
// Fetch available headers and apply jQuery.masonry
|
||||
// once the images have loaded.
|
||||
$( function() {
|
||||
var $headers = $('.available-headers');
|
||||
|
||||
var headers = $('.available-headers');
|
||||
headers.imagesLoaded( function() {
|
||||
headers.masonry({
|
||||
itemSelector: '.default-header'
|
||||
$headers.imagesLoaded( function() {
|
||||
$headers.masonry({
|
||||
itemSelector: '.default-header'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
}(jQuery));
|
||||
|
|
Loading…
Reference in New Issue