Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help Wanted: Shims for jQuery independence and Zepto support #5

Closed
julianshapiro opened this issue Apr 29, 2014 · 10 comments
Closed

Help Wanted: Shims for jQuery independence and Zepto support #5

julianshapiro opened this issue Apr 29, 2014 · 10 comments

Comments

@julianshapiro
Copy link
Owner

These jQuery functions need to be stripped out into their own Velocity add-on -- preferably all encapsulated under a new prefix to indicate their connection, but also their differentiation, from their jQuery counterparts:

$.extend()
$.data()
$.queue()
$.dequeue()
$.offset()
$.isPlainObject()
$.isEmptyObject()

The goal would be to separate out these shims into an independent file to be optionally loaded alongside Velocity in production.

If anyone's willing to tackle this, feel free to reach out to me about it. For now, my personal focus is on addressing any bugs that arise so I can ensure Velocity is a reliable long-term replacement for jQuery's $.animate().

@nmussy
Copy link
Contributor

nmussy commented Apr 29, 2014

A clean way to do things might be to start a very specific, stripped to the core object of methods for the jQuery needs, so as not to disrupt too much of your incredibly clean and clear code.
Others advantages of using this method are extensiblity and reusability.

And I think not supporting IE 7 is very wise. One would assume another would not see much difference between your optimized animations vs. those of jQuery on a Widnows XP + IE lte 7 configuration.

@julianshapiro
Copy link
Owner Author

Well said. And, I agree with your suggestion fully.

Question is, who's going to do build it? :) If no one else does, I'll attack it in the future.

@nmussy
Copy link
Contributor

nmussy commented Apr 29, 2014

I'm going to make a quick skeleton of the _$ object with whatever functions I dare to write this late at night, and make a pull request if someone wants to continue this until I can find some free time.

@julianshapiro
Copy link
Owner Author

You are awesome. Excited that you're interested in toying with this. I know a lot of people will appreciate this. I've been asked about jQuery independence multiple times in the last 24 hours.

@nmussy
Copy link
Contributor

nmussy commented Apr 29, 2014

Sample prefixes we could use:

$Util('<span>').html("$ is old");
_$('<span>').html("_$ is dead");
$_('<span>').html("Long live S!");

@Pomax
Copy link

Pomax commented Apr 29, 2014

Minification turns any "multiple-letter identifier" into a single one anyway, so you could just get away with a normal word (similar to how jQuery has both jQuery and $).

@nmussy
Copy link
Contributor

nmussy commented Apr 29, 2014

My judgement is sleep deprived. I went with $Utils, we'll see later on if we stick to it or not.

At the moment, it's very primitive and basically can't be used for anything, not even for the "implemented" .offset() method, because I'm not even handling the DOM elements well. 😆

@nmussy
Copy link
Contributor

nmussy commented Apr 30, 2014

Alright, it's getting there. I tried the last version I committed on the playground, and it seems to be working. Further testing will be needed though, obviously, but this is a good start.

This is the full list of used jQuery functions, please comment if you've seen more.

Done:

  • $().offset()
  • $().position()
  • $.each()
  • $.isPlainObject()
  • $.isEmptyObject()

Left to do:

  • $.data()
  • $.extend()
  • $.queue()
  • $.dequeue()

@julianshapiro julianshapiro changed the title Shims for jQuery independence and Zepto support Help Wanted: Shims for jQuery independence and Zepto support May 1, 2014
@SiteSplat
Copy link

Just double checking on this, is jquery out of the plugin for good?

@ydaniv
Copy link
Contributor

ydaniv commented Mar 1, 2015

yep

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

Successfully merging a pull request may close this issue.

5 participants