jquery incompatibility?
-
I have a jquery script that makes an image slideshow with transparent caption, and I would like to use this on my wordpress homepage. It works perfectly outside of wordpress.
Where I found it: https://www.queness.com/post/152/simple-jquery-image-slide-show-with-semi-transparent-caption
This is what I have in a file called slider.js : https://wordpress.pastebin.com/f3154e4de
My header looks like this:
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.pngFix.pack.js"></script> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.flow.1.2.min.js"></script> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.jcarousel.pack.js"></script> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.prettyPhoto.js"></script> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/slider/slider.js"></script>
and the above is loaded after
<?php wp_head() ?>
The problem is when I access the page, the slider does not work – the images are all displayed in a row.
Firebug says: slider.js (line 24)
$("#slider .content").html($("#slider a:first").find("img").attr("alt")) is null [Break on this error] $('#slider .content').html($('#slider a:first').find('img').attr('alt'))\r\n
Any thoughts on what I need to do to get this to work would be greatly appreciated, but please keep in mind I know nothing about javascript, so use small words. ??
- The topic ‘jquery incompatibility?’ is closed to new replies.