WordPress.org

Make WordPress Core

Changeset 22504


Ignore:
Timestamp:
11/09/2012 11:55:20 AM (9 years ago)
Author:
koopersmith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/custom-header.js

    r22228 r22504  
    11(function($) {
     2    // Fetch available headers and apply jQuery.masonry
     3    // once the images have loaded.
     4    $( function() {
     5        var $headers = $('.available-headers');
    26
    3     var headers = $('.available-headers');
    4     headers.imagesLoaded( function() {
    5         headers.masonry({
    6             itemSelector: '.default-header'
     7        $headers.imagesLoaded( function() {
     8            $headers.masonry({
     9                itemSelector: '.default-header'
     10            });
    711        });
    812    });
    9 
    10 })(jQuery);
     13}(jQuery));
Note: See TracChangeset for help on using the changeset viewer.