jquery & vertical img scrolling

ps / 2009-05-13 15:20:28   

If I would be using the "over and over" plugin, and wanted to append a "scroll to next image" button to each of the images, how would I do that?

First of all, I guess one could:
- Customize the .php and put a div+class around each of the images
- Add a (scroll to next image) button div/span to each of the images, see above.

All fairly easy, and here I'm stuck, already.
- HTML anchors wouldn't work, since the divs can't have ID's.
- jQuery's .cycle wouldn't work(?)

Maybe traversing? .next ()?
It's hard to get my brain behind this from a designer's perspective, but I guess .next is the right direction, in the very meaning of the sentence? Anybody has a better idea?

Vaska, even if you know the answer to this one, please go out enjoy the sun for a bit, will ya. :)

cheers
Phil

Vaska A / 2009-05-13 15:49:10   

Grey and blecky here today. Tomorrow sun (so says the forecast).

Line 43 edited...

  1. $anchor = ($i >= $total) ? 1 : $i + 1;
  2. $a .= "<div class='anchored'><p><a href='#anchor-$anchor' name='anchor-$i'><img src='" . BASEURL . GIMGS . "/$go[media_file]' alt='$go[media_caption]' />
  3. <span>$text</span>n</p></a></div>";

I added the $anchor first so that it would automatically move to the next one. If you are at the last one it will move to the first one.

After line 35 add this...so we have the total number of images...

  1. $total = count($pages);

Also, you can style the div with the 'anchored' class if you want to add some margin underneath them (which might be a nice idea).

This isn't really a scroll though...it's a jump. You could do a scroll but that's another level of things beyond what I can do here quickly. Jquery has autoscroll scripts you could look into.

ps / 2009-05-14 21:30:16   

Well now it's bloddy wind and rain and drizzle for us here too..

Thanks for the code, works like a charm. Looks like this at the moment btw.:
http://tinyurl.com/qgru76

Sometimes the animations get stuck, then again I'm still learning how to use all this. :)

cheers mate, thanks again! If you're ever in town, let me know..

photojordan / 2009-09-28 19:25:29   

hi vaska, this has caused me some wall/head bashing for the last few hours. i want to replicate this 'jump' effect for the crabs template. could you help me figure out which lines in my exhibit php i should be editing?

Vaska A / 2009-09-28 21:16:32   

What are you trying to do? Scroll horizontally? And, why are you using crabs...you should be using the 'horizontal' format on the downloads page.

photojordan / 2009-09-29 04:30:03   

here's my site. i want the images to move horizontally on click, similar to the way this works on phil's page (link from above: http://tinyurl.com/qgru76). ideally, the click would be on an icon instead of on the image.

i switched to horizontal. has this replaced crabs? i've been away for some time...

thanks very much for your help.

arsondpi / 2009-09-29 10:20:55   

Hello
The site you posted uses a script called LocalScroll that works with jQuery. It's applied in the plugin...
Did you try to contact Phil? Maybe he can give you a headstart....

ps / 2009-10-09 17:42:43   

it's all quite simple, I'll post a detailed description here soonish, lot's of work at the moment.

This thread has been closed, thank you.