Today when doing discuz template, use jquery and the original theme JS conflict. This is mostly Discuz x uses $ (ID) as the Fetch method for the DOM node, and the $ symbol just happens to conflict with jquery's default symbol.
The following are workarounds based on previous discuz x and jquery conflicts. For everyone to make a reference!
The jquery js file jquery-1.8.0.min.js into the/static/js directory, the following two methods share this file, if not placed in the directory, the subsequent code, please modify the corresponding.
Workaround 1:
Modify the/template/default/common/header_common.htm, in the 16th line of code
Then add the following code:
Copy Code
The code is as follows:
<script src= "{$_g[setting][jspath]}jquery-1.8.0.min.js? {Verhash} "></script>
After that, use jquery's $ (instead of the place.
Workaround 2:
Modify/template/default/common/header.htm to add the following code before the 20th line of code:
Copy Code
The code is as follows:
<script src= "{$_g[setting][jspath]}jquery-1.8.0.min.js? {Verhash} "></script>
Discuz Tutorial: discuz template js and jquery conflict solution