1

Using Rails 3.1, I'd like to load zepto when serving a browser that zepto supports (Zepto supports Safari, Chrome, Firefox and Opera and any mobile WebKit-based browser) and jquery in all other cases.
The motivation of course, is to provide a complete experience from one hand and a minimal file size, particularly for mobile devices, on the other hand.
What's the best technique? Is this approach discouraged? (see Rails 3 Conditional Inclusion of Javascript files for similar question and discouragement).
cheers.

Community
  • 1
  • 1
Ran
  • 7,541
  • 12
  • 59
  • 72
  • sounds like a duplicate of http://stackoverflow.com/questions/8725905/zepto-fallback-to-jquery – phoet Feb 03 '12 at 16:37
  • well, that's almost a dup but I think I'll take it as close enough. what this doesn't cover is non-webkit mobile browsers. But that'll do for now... thanks – Ran Feb 05 '12 at 12:27

0 Answers0