WHY is it that i cannot use Scriptaculous and jQuery in the same page without calling: jQuery.noConflict() ?
all right, good to know. Thank you!
Lucian
2010-07-15 19:56:42
@Lucian: If an answer helped in solving the problem, you should mark it accepted.
BalusC
2010-08-17 13:44:33
How do i do that ?
Lucian
2010-08-17 20:01:43
asked too fast, i found it
Lucian
2010-08-17 20:02:15
+1
A:
WHY is it that i cannot use Scriptaculous and jQuery in the same page without calling: jQuery.noConflict() ?
If you were able to use different javascript libraries on same page, the very existence of jQuery.noConflict()
was not needed. It is because of special symbol $
which holds special meaning in those different javascript libraries.
Sarfraz
2010-07-15 19:53:33
A:
You can use $ in the following scenario:
jQuery.noConflict(); // Put all your code in your document ready area jQuery(document).ready(function($){ // Do jQuery stuff using $ $("div").hide(); }); // Use Prototype with $(...), etc. $('someid').hide();I think it's the best way of using libraries which had the same $ function
Nik
2010-07-15 20:03:44