How to insert jQuery.noConflict(); to avoid conflict between Moset tree component and Autson Slideshow and where exactly? Thanks
Asked
Active
Viewed 2,212 times
3 Answers
1
When in Joomla!, it's better to use the API provided to incluse js and CSS files.
$document = JFactory::getDocument();
$document->addScript('path/to/jquery.js');
$document->addScriptDeclaration('jQuery.noConflict()');

Valentin Despa
- 40,712
- 18
- 80
- 106
-
I know all this code but how to insert it and where and in which file? – Nadia Sep 19 '12 at 11:03
-
You may insert it in your template or in your component template file (inside the view). Check where jQuery is inserted in the first place. Having jQuery duplicates is also not good. – Valentin Despa Sep 19 '12 at 11:08
-
Do you have team viewer you can see the problem? – Nadia Sep 19 '12 at 11:15
0
I think the place to add it is exactly after the tag referencing jQuery. From http://api.jquery.com/jQuery.noConflict/
<script type="text/javascript" src="other_lib.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$.noConflict();
// Code that uses other library's $ can follow here.
</script>

Damyan Petev
- 1,585
- 7
- 10
-
Can i send you the file to check it your self because am not pro in development – Nadia Sep 19 '12 at 09:56