mirror of
https://github.com/jquery-validation/jquery-validation.git
synced 2025-12-24 12:13:59 +01:00
Fix jQuery loader to use path of itself. Fixes nested demos.
This commit is contained in:
4
lib/jquery.js
vendored
4
lib/jquery.js
vendored
@@ -2,6 +2,8 @@
|
||||
|
||||
var parts = document.location.search.slice( 1 ).split( "&" ),
|
||||
length = parts.length,
|
||||
scripts = document.getElementsByTagName("script"),
|
||||
src = scripts[ scripts.length - 1].src,
|
||||
i = 0,
|
||||
current,
|
||||
version = "1.9.0",
|
||||
@@ -16,7 +18,7 @@ for ( ; i < length; i++ ) {
|
||||
}
|
||||
|
||||
if (version != "git") {
|
||||
file = "../lib/jquery-" + version + ".js";
|
||||
file = src.replace(/jquery\.js$/, "jquery-" + version + ".js");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user