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:
parent
bda841315a
commit
156e782313
|
@ -1,10 +1,13 @@
|
||||||
(function($) {
|
(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.imagesLoaded( function() {
|
$headers.masonry({
|
||||||
headers.masonry({
|
itemSelector: '.default-header'
|
||||||
itemSelector: '.default-header'
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}(jQuery));
|
||||||
})(jQuery);
|
|
||||||
|
|
Loading…
Reference in New Issue