Using jquery and other frameworks, have experienced less $ to write, time to do more, there will be conflict
solution:
1. Release of the right to use $
- Release "$" the right to use: jQuery.noConflict ();
- Precautions: release operation must be written before writing the other jQuery code
can not use the "$" after the release, only use "jQuery"
2. Customize a symbolic visit
- Access a custom symbol: var nj = jQuery.noConflict (); release $ symbol used instead nj
<script>
var nj = jQuery.noConflict();
nj(function () {
alert("hello jq1")
})
</script>