tmpvar / weld

Template antimatter for Node.js (Browsers too!)
674 stars 39 forks source link

jQuery plugin: selector should limit the elements to work on. #18

Closed fschaefer closed 13 years ago

fschaefer commented 13 years ago

The jQuery plugin shouldn't be limited to the first element in the element collection this[0]. Instead the selector should limit the targeted elements.

$.fn.weld = function (data, config) {
  return this.each (function () {
    weld(this, data, config);
  });
};
heapwolf commented 13 years ago

i dont see a special reason for using only the first element, at one point during development there may have been a reason, but not now.

tmpvar commented 13 years ago

Agreed. On Apr 12, 2011 3:22 AM, "fschaefer" < reply@reply.github.com> wrote:

The jQuery plugin shouldn't be limited to the first element in the element collection this[0]. Instead the selector should limit the targeted elements.

$.fn.weld = function (data, config) { return this.each (function () { weld(this, data, config); }); };

Reply to this email directly or view it on GitHub: https://github.com/hij1nx/weld/issues/18

heapwolf commented 13 years ago

i updated the readme FYI