I am working on a site that has a jquery loop plugin built in. Everything worked fine until I tried to add the lightbox plugin. There seems to be a problem in the element that only allows the latest JS files to work. Any help would be great.
Here is the jquery code that I use in the element.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.2.74.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var titles = ['Pentiction Summer Classic', 'Ryan Kesler', 'Trevor Linden'];
$('.slideshow').after('<div id="navigation"><div id="nav"></div></div>').cycle({
fx: 'fade',
timeout: 5000,
pager: '#nav',
pagerAnchorBuilder: function (index) {
return '<a href="#">' + titles[index] + '</a>';
}
});
});
</script>
It works without any problems.
Here is the lightbox code in the element.
<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<script src="js/lightbox.js" type="text/javascript"></script>
It also works without problems. When I combine them, only the last element works. The first is torn.
I checked the error console and this is the error:
Error: element.dispatchEvent is not a function Source file: http: // localhost: 8888 / rockymountainsports / rms / web / js / prototype.js
Line: 3972
, js . ?