Page 1 of 1

[ SOLVED ] Can't get this Slider to work on 1.9.4

Posted: Tue Mar 08, 2011 5:30 am
by fearmydesign
Hello, I have a brand new 1.9.4 installation, and for some reason I can't get this standard JavaScript slider that I have used for other sites before... here is the code that I have inserted in my template

Code: Select all

<__script__ type="text/javascript" src="uploads/js/jquery142.js"></__script>
<__script__ type="text/javascript" src="uploads/js/jquery.cycle.all.min.js"></__script>
<__script__ type="text/javascript">{literal}
$(document).ready(function() {
    $('.shoeslide').cycle({
	fx: 'scrollRight',
        timeout:     4000,
        next:      '#next',
        prev:      '#prev',
        pagerEvent: 'click',
        fastOnEvent: false
	});
});{/literal}
</__script>
then I am calling my images by;

Code: Select all

<div id="header">{global_content name='shoeslide'}</div>
I have also uploaded both of these files to the site under /uploads/js/

jquery142.js
jquery.cycle.all.min.js


Anyone have any suggestions? here is the link http://limoservicesmaryland.com/index.php

Re: Can't get this Slider to work on 1.9.4

Posted: Tue Mar 08, 2011 8:30 am
by uniqu3
Javascript like jQuery and it'S functions are recommended to be placed before <__body> just as a side note.
Why your slider doesn't work is that you call the cycle function for a class named "shoeslide" but in your template there is nothing with that class.

Try:

Code: Select all

<div id="header" class="shoeslide">{global_content name='shoeslide'}</div>

Re: Can't get this Slider to work on 1.9.4

Posted: Tue Mar 08, 2011 2:47 pm
by fearmydesign
uniqu3 wrote:Javascript like jQuery and it'S functions are recommended to be placed before <__body> just as a side note.
Why your slider doesn't work is that you call the cycle function for a class named "shoeslide" but in your template there is nothing with that class.

Try:

Code: Select all

<div id="header" class="shoeslide">{global_content name='shoeslide'}</div>
Thank you... I can't believe that's what I was missing. Thanks again!!