rails/jquery-ujs — Issue #245: Make it easy to override the way we get the href
Author: webmat
Created: 2012-03-07 22:05:20+00:00
State: open

First of all, thanks for working jquery_ujs!

I'd like it if jq_ujs provided an easy way to override how it gets the href from an element. Just like we can override the ajax call. I've seen issue #4, but my suggestion is coming from a different place.

10s background: I'm currently working with jQuery Mobile and jquery_ujs. They recently started [messing around with the href](https://github.com/jquery/jquery-mobile/commit/4f12d469454f777c845ee245d60d5a7c3a710db9) on touch devices, in order to keep iOS from displaying the address bar. They tuck it away in a data-href attribute.

So if jq_ujs could let me override the way it gets an element's href, I could deal with this situation gracefully. I'm sure other frameworks do (or will) use the same kind of trick to keep the address bar from appearing. So I think it makes sense to include this feature in jquery_ujs. What do you think?

Let me send you a pull request, for my implementation...