JQuery conflict with an other JQuery library

前端 未结 5 894
南笙
南笙 2021-01-02 05:07

I use jquery for a module. My joomla template have an integrated jquery menu. So they conflict with each other.

Is there a way to solve this problem. Following the s

5条回答
  •  伪装坚强ぢ
    2021-01-02 05:20

    did you mean that your joomla loaded 2 kind of jquery at the same time ? 1st your menu load jquery and then your module load jquery ?

    here is the solutions: In joomla templates, we can overriding the module or component views (I assume you must be using joomla 1.5.x right?)

    1. in your templates create a directory called html/ eg: templates/yourTemplate/html/

    2. copy file from modules/mod_yourMenu/tmpl/.* into your your template html (templates/yourTemplate/html/mod_yourMenu/) --> * you don't need to add tmpl/ *

    3. edit the php files inside and delete all tag that load jquery

    4. do the step 1-3 for modules that using jquery.

    5. edit your template, put tag to load latest version of jquery.

    it should work now :)

提交回复
热议问题