Deepankar Nath
Deepankar Nath

Reputation: 1

Error implementing Jquery Cycle Plugin

I have been trying to implement many types of slider onto my magento store but I am getting a error each time I am trying to do it. Its very simple error but I am still not being able to rectify it.

Please check this page and let me know why the slider is not working I have called all the necessary plugins and js scripts but its still showing me the error.

www.pennysave.com.au/test

Please help me I am really running out of time and I need to start off with the store asap.

Upvotes: 0

Views: 1015

Answers (2)

MagePsycho
MagePsycho

Reputation: 2004

Using $ may conflict with prototype library.
Here is the approach that i follow while including jQuery plugins:
1> Include jQuery file in only required pages using layout updates as:

<default>
    <reference name="head">
        <block type="core/text" name="google.cdn.jquery">
            <action method="setText">
                <text><![CDATA[<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script><script type="text/javascript">jQuery.noConflict();</script>]]>
                </text>
            </action>
        </block>
    </reference>
</default>

2> Then include the jQuery Plugin just after the jQuery inclusion
3> Use jQuery instead of $ in your initialization code. For example:

jQuery(function() {
    jQuery('#slideshow img:first').fadeIn(1000, function() {
        jQuery('#slideshow').cycle();
    });
});

Hope this helps a bit.
Thanks

Upvotes: 1

ShankarSangoli
ShankarSangoli

Reputation: 69905

You have this code in your page.

$(function() {
    $('#slideshow img:first').fadeIn(1000, function() {
        $('#slideshow').cycle();
    });
});

And I don't see #slideshow container at all on the page. What do you expect to happen?

Upvotes: 1

Related Questions