From: Scott González Date: Thu, 20 May 2010 00:33:23 +0000 (-0400) Subject: Core: Better detection of when core is loaded twice. Fixes #5636 - Load ui.position... X-Git-Tag: 1.8.2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=afaa03575f22bda227ac82ed3bb08bc29ba3b1be;p=jquery-ui.git Core: Better detection of when core is loaded twice. Fixes #5636 - Load ui.position before ui.core couse ui.core not execute. --- 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({