"data-delay" for per-link delay property #68

Open
liviucmg opened this Issue Apr 20, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@liviucmg

It would be useful to support a "data-delay" or similar attribute that overrides the delay option used in InstantClick.init(delay);.

For example, my website has full screen image galleries on which the users usually scroll idly, resulting in a lot of mouseover hits. It would be awesome to use InstantClick.init(50); for most of the links, and <img data-delay="mousedown"> for the gallery images. In this case 'mousedown' would override '50'.

Would you be accepting a pull request for this?

Cheers!

@dieulot dieulot added the Enhancement label Sep 28, 2014

@dieulot

This comment has been minimized.

Show comment
Hide comment
@dieulot

dieulot Sep 28, 2014

Owner

At the moment I’m not considering adding this feature (but I reserve the right to change my mind in the future). I think it’ll add too much complexity.

In your case I recommend just using ‘mousedown’ for everything.

Owner

dieulot commented Sep 28, 2014

At the moment I’m not considering adding this feature (but I reserve the right to change my mind in the future). I think it’ll add too much complexity.

In your case I recommend just using ‘mousedown’ for everything.

@dieulot dieulot closed this Sep 28, 2014

@dieulot

This comment has been minimized.

Show comment
Hide comment
@dieulot

dieulot Jan 3, 2015

Owner

Considering. This (delay), no delay, mousedown, each configurable for any container or link.

I’m currently not sure how to best implement this, so a pull request won’t be accepted.

What I’m thinking for now though, is data-instant="delay in ms|mouseover|mousedown".

Update: Also, data-instant="pjax" or something like that for no preloading at all, while still using pjax.

Owner

dieulot commented Jan 3, 2015

Considering. This (delay), no delay, mousedown, each configurable for any container or link.

I’m currently not sure how to best implement this, so a pull request won’t be accepted.

What I’m thinking for now though, is data-instant="delay in ms|mouseover|mousedown".

Update: Also, data-instant="pjax" or something like that for no preloading at all, while still using pjax.

@dieulot dieulot reopened this Jan 3, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment