I’m having an issue on a site where the theme is not playing nicely with a plugin. Both use jquery. I’ve contacted the plugin developer and am contacting you as well. Hopefully we can figure out whose code is not properly constructed.
The code in question is:
// Adds javascript for scroll
add_action( 'genesis_after_footer', 'scroll_javascript' );
function scroll_javascript() { ?>
<!-- SMOOTH SCROLL -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
</script>
<!-- End of SMOOTH SCROLL -->
<?php
}