Hi all i put jquery file in master page version jquery-1.4.2.min.js and in another page jquery file jquery-1.2.6.min.js just in Firefox the jquery features don't work
-
Simply don't include the `jquery-1.2.6.min.js` file, jQuery 1.4.2 include all features of that plus more. – Shadow The GPT Wizard Mar 09 '11 at 09:30
-
Hi shadow-wizard i should put two files – Osama khodroj Mar 09 '11 at 09:31
-
No you don't. The latest version of jQuery should have full backward compatibility and if you do get some error post it here (edit your original question) and we'll help you solve it. – Shadow The GPT Wizard Mar 09 '11 at 09:37
-
ok i put last version
and i have one error ----Uncaught Syntax error, unrecognized expression: )---- – Osama khodroj Mar 09 '11 at 09:39 -
Firefox should give you the exact code causing this error, please edit your question with two things: the code you now have to include the jQuery and the code causing that error. – Shadow The GPT Wizard Mar 09 '11 at 09:56
2 Answers
JavaScript doesn't support class, function or whatever library.
You're just including jQuery twice - different versions -.
If you want to use both, you'd need to change jQuery prefix.
Version A: $ Version B : $$
Or any other valid prefix.
You can do so by changing jQuery object name to jQueryA and jQueryB, and at the end of jQuery source code, change the "$":
// Expose jQuery to the global object
window.jQueryA = window.$ = jQueryA;
...and:
// Expose jQuery to the global object
window.jQueryB = window.$$ = jQueryB;
It's not a good approach so far, but maybe your requirements are leaving an old version of jQuery for some tasks because you don't support some code, and you want to do some new feature with another and newer jQuery version...

- 63,804
- 18
- 124
- 206
What happens when you include jquery a second time, is that it forgets all customizations that has been made since the first include. So the solution is simple: Dont include it twice.

- 4,255
- 26
- 46