Jquery Slideshow in page not working

I am trying to integrate a jquery slideshow, but its doesn't work. I am using 3 files jquery, jquery cycle plugin and slideshow stylesheet, both are included in page but slidesow is not moving. Here is the link, the slideshow is in #slider ul .

http://tinyurl.com/88aotym

The relavant folder which has js and stylesheet is 'cat-slider'.

This is jquery function in the head section

    <script type="text/javascript">

   $(function() 
   {
    $(".slider ul")
    .cycle({
        prev:   '.slider .controls .prev', 
        next:   '.slider .controls .next',
        timeout: 3000,
        pager:   '.slider .controls .pages',
        pagerAnchorBuilder: pagerFactory,
        before: function(Ec, En, o, f) 
        {           
            var classTarget = $(Ec);
            var nextClassTarget = $(En);

            classTarget = classTarget.context.attributes.rel.value;
            nextClassTarget = nextClassTarget.context.attributes.rel.value;

            $('.slider .controls .' + classTarget).removeClass('selected');
            $('.slider .controls .' + nextClassTarget).addClass('selected');
        }
    });

    // Pager Function
    function pagerFactory(idx, slide) 
    {
        var selected = (idx == 0 ? 'selected' : null);
        return '<img src="http://mysite.com/wp-content/plugins/cat- slider/images/blank.gif" width="13" height="14" class="number '+ selected + ' ' + parseInt(idx+1)+'" />';
    };
});

</script>

Answers


I checked Your code with some breakpoints and as it turned out browser even don't jump into Your script code. Try change this:

$(function() 
   {

to this:

$(function() {

That's not a joke ;) I heard recently that in JS sometimes ';' are inserted automatically at the end of the line even if we don't want that in that place. Maybe it is happening in Your code.


Need Your Help

How does caching works without max-age or expiry settings

caching web http-headers

I noticed a few websites such as Yahoo and Stackoverflow having response headers that neither contains a max-age in Cache-Control setting nor a valid date in Expires setting.

getting wordpress logged user id

php wordpress

I'm trying to get the current user id from an application outside wordpress on the same domain inside a subfolder using: