darsain / sly

JavaScript library for one-directional scrolling with item based navigation support.
http://darsa.in/sly
2.87k stars 497 forks source link

Scroll on Mouse Move #180

Closed blpraveen closed 9 years ago

blpraveen commented 9 years ago

1)I want to know is it possible to scroll the items on mouse move instead of Mouse drag?

2)And also If items includes iframe as in my case . I am using sly to scroll widgets. Widgets includes corss domain iframes which will not allow to dispatch the mouse move event to the parent.

darsain commented 9 years ago
  1. Yes, if you implement it using Sly's API. I suggest looking into .slideTo() method.
  2. The same-origin-policy prevents you from listening to what is going on in the Iframe. You'd have to pass messages between iframe and parent window, and simulate events in parent. Not trivial.
blpraveen commented 9 years ago

Thanks , to my first point I was trying accelerated scroll http://alexmatchneer.com/blog/2012/11/12/jquery-accelerated-hover-scroll/. It is working and I am using it in the slider. Regarding Iframe I would give up as the links are external and I could not modify the external source link