Problem Description:
Recently learned to use Discuz to imitate a portal site, inside to the navigation bar to make a sliding effect, to use jquery, will use jquery reference to Header.htm, as shown in:
However, since Discuz uses PHP and its own mechanism, the $ in jquery will conflict with the Common.js and forum.js of Discuz itself, resulting in the following error causing the drop-down list
Workaround:
Workaround: Redefine jquery's $, for example, I will use JQ to represent jquery's $
At the end of the Jquery-1.7.2.js, add the following code:
var jq = $.noconflict (); //Use the Noconflict () method to specify a new name for the jQuery variable
:
Because I also used $ in header.htm, to change it to JQ, as follows:
Also to change the reference to the other JS in the $ to JQ, change the Jquery.movebg.js file as shown:
This solves the problem as shown in the following:
Troubleshoot Discuz and jquery incompatibilities--drop-down list not available (uncaught typeerror:cannot set property ' position ' of undefined)