scroll content left to right
- Started
- Last post
- 8 Responses
- dbloc
what is the best way to scroll through divs left to right, but only load the div when you get to it.
- dbloc0
varying height divs
- gonzalle0
tell us more
- Hombre_Lobo0
You could use jquery cycle to scroll through divs.
It's usually used for image sliders but works with major tags like div span p etcAnd you can use jquery to load content on the fly. I not sure how you would mash it to work with cycle though, but it shouldn't be too tricky.
- Hombre_Lobo0
After a very quick search for 'jquery cycle load on the fly'
I found a solution - http://jamesmorrish.co.uk/blog/u…Haven't tested it though, but should be fine.
Also in relation to varying heights of the divs, jquery cycle can have slides that are being cycled at different heights happily.
If one slide is larger than the previous it just pushes the content below it down, and moves the content below it up if its shorter.
- dbloc0
I was thinking more of a scrollto function/plugin but I guess cycle would work
- dbloc0
it's a combo of fullscreen images and scrollable content
- hotroddy0
you mean like this?
http://jessycain.com/new2/HOLIDA…
- Hombre_Lobo0
Np dude! :)
Just remember you cant have a class or id on the divs (or which ever element you choose to use) you want to cycle. Just wrap a div around them and give it a class/id, and then bang that class/id into the cycle script.
Also in the script, be sure not to put a comma after the last Cycle option. If you see here - http://jquery.malsup.com/cycle/
You can see there is never a comma on the last option (like the shuffle example has delay -4000 with no comma).It's just how you do it in JavaScript syntax, but if you do put a comma on the last one it will work in several modern browsers, so you wont notice. But not IE 7+8! Piece of shit IE, debugging that shit took me a fucking long time!
This is what I've found in my experience anyway, just one of those things they don't mention.