I have 2 javascript libraries that I want to combine in one page, is that possible:
<script src="jquery.js"></script>
<script src="jPaginate.js"></script>
<script>
$(function(){
$("#content").jPaginate();
});
</script>
<script type="text/javascript" src="pic/js/jquery.js"></script>
<script type="text/javascript" src="pic/js/jquery.lightbox-0.5.js"></script>
<script type="text/javascript">
$(function() {
$('#gallery a').lightBox();
});
</script>
Thanks,
Amir
Yes, you can. If you don’t take precautions, the second inclusion might overwrite the first one though.
For jQuery, there is
jQuery.noConflict. Especially have a look at the example which loads two different jQuery versions.