Custom Headers: Ensure the ready event fires before fetching the existing headers to apply jQuery.masonry. see #20346, #21820.

git-svn-id: http://core.svn.wordpress.org/trunk@22504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith 2012-11-09 11:55:20 +00:00
parent bda841315a
commit 156e782313

View File

@ -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));