I am using the jQuery plugin that I found here: http://tutorialzine.com/2011/03/photography-portfolio-shutter-effect/ , but I changed it a bit.
It still works fine in the way it is supposed to, but I added the next button, which the custom cna uses to go to the next image, and then stops the interval for one loop so as not to change the next image too quickly.
However, my problem is the scroll button. I'm not sure how to do this, so I added a variable
var positionInt
which is the position of the last element of the list, so I know where I am in the list.
How to use this together with the li object created by this line:
var container = $('#container'), li = container.find('li');
to open the correct li element?
Also, how can I find the length of an object li? I tried li.size (), li.count () and li.length and did not work.
Or is there a way using only the .find () method to open the li element in front of the currently visible one? Here's how it happens initially: forward :
li.filter(':visible:first').hide(); // Hid the only visible li if(li.filter(':visible').length == 0){ li.show(); // if nothing is visible load a li (Im not really sure what this is pointing at, but it loads the next li) }
Greetings
source share