small JS tidbit
- Started
- Last post
- 8 Responses
- epigraph
Have some scrolling images contained inside divs with the same class.
Need a bit of JS that executes one command if the image is clicked in the left 50% of the screen and executes another if it's clicked in the right 50% of the screen.
Basically trying to make images scroll left or right when clicked.
Anyone want to do this as a tiny job, or point me in the right direction?
- epigraph0
Thanks dbloc, from what I can this does not do what I need. Scrolling with next and prev buttons is no problem with plugins.
I need a div to become either a next or prev button depending where on the screen it is. Then I can use a plugin to scroll.
- orrinward0
Make a parent div that is 100% the width and height of the image, with two child divs at 50% width. Make one the left scroll and the other the right.
Am I missing something as this seems quite simple.
- epigraph0
sorry guess II should clarify that each image displays a tooltip on rollover, so if i put anything on top of them the tooltips wont work.
I was thinking the tootip class has to serve double duty as scrolling nav too.....
- dbloc0
yes, you can set next and prev buttons in cycle.
- dbloc0
have whatevr you put on top display the tooltips instead
- dbloc0
try this.
http://api.jquery.com/mousemove/…
- TheBlueOne0
This one?
http://johnpatrickgiven.com/jque…For eg. used here:
http://www.fundelbau.de/leistung…- exactly what I want, thanks for the example too!epigraph
- yeah, perfect. Marry me.epigraph
- Do you have a vagina and believe in polygamy?TheBlueOne