Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding curtain.js

i've been trying to understand how to use the jQuery plugin curtain.js (https://github.com/victa/curtain.js).

i've tried to follow the instructions, but i must be doing something wrong because i can't get it to work.

Maybe the problem is with something else, but the jquery that i wrote is:

$(function () {
    $('.curtains').curtain({
        scrollSpeed: 400
    });
});

I've made a fiddle so you can see the code i have now. The fiddle is here: http://jsfiddle.net/NvGgW/1/

Any help would be VERY welcome. Thank you!

like image 983
Boguz Didgeridoo Avatar asked Nov 25 '25 16:11

Boguz Didgeridoo


1 Answers

I think you are doing everything OK, it just doesnt work with the latest version of jquery, works ok with Jquery 1.7.2, i've changed your fiddle for you and included a copy of the plugin in the JS window:

http://jsfiddle.net/jamesking/NvGgW/3/

<ol class="curtains">
<li id="One" class="sectionOne">
    <h1>SECTION ONE</h1>
</li><!-- end #sectionOne -->
<li id="Two" class="sectionTwo">
    <h1>SECTION TWO</h1>
</li><!-- end #sectionTwo -->
<li id="Three" class="sectionThree">
    <h1>SECTION THREE</h1>
</li><!-- end #sectionThree -->
<li id="Four" class="sectionFour">
    <h1>SECTION FOUR</h1>
</li><!-- end #sectionFour -->
</ol>
like image 188
James King Avatar answered Nov 28 '25 17:11

James King



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!