alexblack / google-fastbutton

Implementation of Google's FastButton javascript and jQuery and XUI.js integration
167 stars 46 forks source link

Replacing .on() with .fastButton() doesn't work #3

Closed tim-peterson closed 11 years ago

tim-peterson commented 11 years ago

I replaced several instances of .on() with .fastButton() as suggested on your documentation:

Every place where you would normally write $(document).on('...', 'click', ...), you can also write $('...').fastButton('click', ...)

Unfortunately, this kills those click events. Am I missing something, do I need to do that plus include the class='use-fastclick' on the <body> tag?

alexblack commented 11 years ago

Hey Tim, where is that in the docs?

Here is example usage from the readme:

$('#your-button').fastClick(function(e) { alert('fast clicked!'); });

tim-peterson commented 11 years ago

Hi Alex, its located here: http://x1024.github.com/jquery-fastbutton/ , toward the bottom of the page...

But this fastButton() vs. fastClick() is confusing, especially since there is another prominent project named fastClick(): https://github.com/ftlabs/fastclick

alexblack commented 11 years ago

Hey Tim, thats a different project :) It references mine, and says it makes some improvements!

tim-peterson commented 11 years ago

oh, man this is confusing! thanks for the clarification. Still maybe warning people about the fastButton, fastClick naming would be a good idea (your project is named fastbutton, but the function call is fastclick())

alexblack commented 11 years ago

looks like that github project is here: https://github.com/x1024/jquery-fastbutton

On Thu, Jan 17, 2013 at 9:42 AM, tim peterson notifications@github.comwrote:

oh, man this is confusing! thanks for the clarification.

— Reply to this email directly or view it on GitHubhttps://github.com/alexblack/google-fastbutton/issues/3#issuecomment-12370480.