im using lightbox.js
it needs prototype.js and i need to use jquery.js. Now both of these libraries dont work together.
Can someone explain how to do noconflict?
The manual on jquery website said i needed to include the prototype.js right after i called noconflict within the script tags, im not sure how to do this.
these are the two files that need prototype
<script type="text/javascript" src="includes/jquery/lightbox/js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="includes/jquery/lightbox/js/lightbox.js"></script>
The answer is simply: Use a jQuery-based lightbox alternative. Colorbox is pretty good for example.
However, noConflict is pretty easy, too:
After including jQuery, run this code:
jQuery.noConflict();. To keep using$in your code, wrap it with the following: