How to use jQuery with other javaScript Library?
When we make a web page, sometimes we have to use 2 or more javascript library. Lots of library use $ as a identifier, so a way that prevent clashes is needed.
There is .noConflict() method which delegate identifier’s authority to other javascript library. For example,
<script src=”prototype.js” type=”text/javascript”></script?
<script src=”jquery.js” type=”text/javascript”></script>
<script type=”text/javascript”>
jQuery.noConflict();
</script>
<script src=”myscript.js” type=”text/javascript”></script>
reference: Learning jQuery 1.3 Jonathan Chaffer, Karl Swedberg.
Advertisement