diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-05-19 20:33:23 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-05-19 20:33:23 -0400 |
commit | afaa03575f22bda227ac82ed3bb08bc29ba3b1be (patch) | |
tree | 406f87fd6f7d88304b7a3441ddb0b4c58d9a2880 /ui | |
parent | fc093e9feb4450b1ab93e3da9a2f7abb1d4335b5 (diff) | |
download | jquery-ui-afaa03575f22bda227ac82ed3bb08bc29ba3b1be.tar.gz jquery-ui-afaa03575f22bda227ac82ed3bb08bc29ba3b1be.zip |
Core: Better detection of when core is loaded twice. Fixes #5636 - Load ui.position before ui.core couse ui.core not execute.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.core.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js index 18f0361ea..9b32e8d1e 100644 --- a/ui/jquery.ui.core.js +++ b/ui/jquery.ui.core.js @@ -7,10 +7,19 @@ * * http://docs.jquery.com/UI */ -;jQuery.ui || (function($) { + +(function($) { + +// prevent duplicate loading +// this is only a problem because we proxy existing functions +// and we don't want to double proxy them +$.ui = $.ui || {}; +if ($.ui.version) { + return; +} //Helper functions and ui object -$.ui = { +$.extend($.ui, { version: "@VERSION", // $.ui.plugin is deprecated. Use the proxy pattern instead. @@ -103,7 +112,7 @@ $.ui = { UP: 38, WINDOWS: 91 // COMMAND } -}; +}); //jQuery plugins $.fn.extend({ |