Just posted this in the wordpress forum and realized it’s probably better suited for here. Apologies for the double post (how do I delete the other one?)
I’m having some trouble with three jQuery parts of my site header. I am trying to get a jQuery dropdown menu, photo slider, and colorbox to all work on the same page. I have some sort of conflict going on and not all three seem to work at the same time. I’m guessing it’s a conflict of jQuery loading differently for each item, possibly as well as the jquery library being loaded by WordPress in the functions.php page.
I can’t figure this out. Anyone want to take a look and let me know what you think?
Here’s the header:
<head>
<title>
<?php
if (function_exists('is_tag') && is_tag()) {
single_tag_title("Tag Archive for ""); echo '" - '; }
elseif (is_archive()) {
wp_title(''); echo ' Archive - '; }
elseif (is_search()) {
echo 'Search for "'.wp_specialchars($s).'" - '; }
elseif (!(is_404()) && (is_single()) || (is_page())) {
wp_title(''); echo ' - '; }
elseif (is_404()) {
echo 'Not Found - '; }
if (is_home()) {
bloginfo('name'); echo ' - '; bloginfo('description'); }
else {
bloginfo('name'); }
if ($paged>1) {
echo ' - page '. $paged; }
?>
</title>
<?php if ( is_singular() ) wp_enqueue_script('comment-reply'); ?>
<?php wp_head(); ?>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.min.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/dropmenu.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
$("#nav-one").dropmenu();
});
</script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.DDSlider.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#yourSliderId').DDSlider({
nextSlide: '.slider_arrow_right',
prevSlide: '.slider_arrow_left',
selector: '.slider_selector'
});
});</script>
<script src="<?php bloginfo('template_directory'); ?>/colorbox/jquery.colorbox.js"></script>
<link media="screen" rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/colorbox/colorbox.css" />
<script>
$(document).ready(function(){
$(".example5").colorbox();
$(".vimeo").colorbox({iframe:true, scrolling:false, width:700, height:440});
});
</script>
<link rel="shortcut icon" href="/favicon.ico">
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
</head>
I’m also using this in the functions.php doc:
// jQuery inclusion
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"), false);
wp_enqueue_script('jquery');
}
Any help is much appreciated. I’m stumped here.