[SOLUTION] Javascript error resolved jquery

Users topics solved on GK Highlighter module
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Sat Feb 07, 2009 4:31 am
Hi

i designed my own template and used gavick highlighter (excellent module) and installed FIREBORAD form, highlighter was working fine on all pages except on fireboard forum pages, and was getting these javascript errors

Code: Select all
($(B) || document).getElementsBySelector is not a function
[Break on this error] }function $ES(A,B){return($(B)||document...var A=[D.namespaceURI?"xhtml:":"",E[1]];
mootools.js (line 131)
el.getProperty is not a function

these errors means that mootools used by gavick highlighter was conflicting with jquery used by fireboard so used this one line code to solve the issue,
this solution can be used with any module which is using jquery (you can check loaded javascript libraries in firebug-firefox).

paste in your template's index.php file just before </head> tag (so that all javascript libraries are loaded first)
Code: Select all
<script type="text/javascript" >
   jQuery.noConflict();
</script>


its quick solution that works, i think noConflict() option should be included in gavick's modules

regards
salman
User avatar
Fresh Boarder

GK User
Sat Feb 07, 2009 11:14 am
... Fireboard should contains this code because it is based on jQuery not Highlighter :P And one good message - new version of fireboard (Kunena) contains this option.
User avatar
Administrator

GK User
Thu Jun 25, 2009 12:32 am
I got the same error with Photoslide GK2 also...

But I already had written too many things with jQuery (using the shortcut $) before install the GK2, but my problem was easily solved changing:

Code: Select all
$(document).ready(function(){
 ...
});


by:

Code: Select all
jQuery.noConflict();
jQuery(document).ready(function($){
...
});


Sorry for my bad english..
User avatar
Fresh Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.