Defer JS to document ready

git-svn-id: http://core.svn.wordpress.org/trunk@23851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2013-03-29 06:42:54 +00:00
parent 5e20a29f04
commit 43ca132c43
1 changed files with 111 additions and 110 deletions

View File

@ -2,7 +2,7 @@ window.wp = window.wp || {};
(function($) {
var mediaFrame, lastMimeType, lastMenu, mediaPreview;
$(function(){
// Post formats selection
$('.post-format-options a').on( 'click', function(e){
var $this = $(this), editor, body,
@ -127,4 +127,5 @@ window.wp = window.wp || {};
mediaFrame.open();
});
});
})(jQuery);