I have a .NET website that uses Masterpages. I'm trying to add some functionality to a menu on my Masterpage that allows the user to mouse over some dynamic links that are constructed in code behind and have another dynamic content area update to display things based on what the user has moused over.
To accomplish this I'm trying to get a JQuery image rotator (the Cycle plugin http://jquery.malsup.com/cycle/) to work. I've also tried doing something similar with JQueryUI.
My problem is that when this code is on a Masterpage it never works, but if I put it on any other page in my site it's fine. I'm not using relative links to the script files in my header.
Can anyone help me in figuring out why I can't get JQuery to function on a Masterpage?
My JQuery Cycle header stuff is below.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="http://malsup.github.com/jquery.cycle.all.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#slideshow').cycle({
fx: 'turnDown',
speed: 'fast',
timeout: 0,
pager: '#nav',
pagerAnchorBuilder: function (idx, slide) {
// return sel string for existing anchor
return '#nav li:eq(' + (idx) + ') a';
}
});
});
</script>