views:

222

answers:

1

I m using Jquery in joomla 1.5.x ( which use mootools internally ) sometimes jquery works fine, but when i use some jQuery plugin then below errors occur

($(filter) || document).getElementsBySelector is not a function mootools.js( line 53)

what is the solution of this error

i m already using jQuery.noConflict() function before writing jquery code inside jquery(document).ready(function() { }

i have seen somewhere about ordering of mootools & jQuery library, that either mootools or jquery code shoud be written first then all code of other library put together.( i forgot the exact sequence).

please suggest me a perfect solution of this error

+1  A: 

First of all its not good idea to use both frameworks in one side. Take a look at http://api.jquery.com/jQuery.noConflict/ to see how jquery noConflict will work. So if you write jQuery.noConflict() you have to write (jQuery(filter) || document).getElementsBySelector, which you can also use without the noConflict line as $() is just an alias vor jQuery().

eskimoblood