ryanve / response.js

Responsive design toolkit
http://responsejs.com
Other
801 stars 123 forks source link

Integrate methods to the $ chain #7

Closed ryanve closed 10 years ago

ryanve commented 12 years ago

Currently (version 0.5) none of Response's methods are exposed to the jQuery chain by default. They only get added if Response.chain() is called. Response.chain() is essentially a one-time use function that integrates the chainable versions of inViewport / inX / inY / dataset / deletes into the jQuery chain (or any lib that uses jQuery-compatible syntax). I originally had it like that to avoid potential conflicts, although chose names for those methods that would not conflict with any jQuery core methods. One of the goals of Response is to integrate nicely into any jQuery compatible library. Do you think it makes sense to automatically integrate these methods into the chain by default?

ryanve commented 10 years ago

People can integrate into the chain if they want but we shouldn't force it. It's safer and simpler to not integrate.