Page MenuHomePhabricator

jquery.badge.js should return "this" (a reference to the jQuery object)
Closed, ResolvedPublic

Description

Usually you can do the following with jQuery plugIns:

  • $('#mySelector').click(_myHandlerMethod).myFirstPlugin({ settings: '' }).mySecondPlugIn();

This is accomplished by returning the passed elements from the plugIn-method.


Version: unspecified
Severity: normal

Details

Reference
bz39383

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:51 AM
bzimport set Reference to bz39383.

Rephrase summary, there is no such thing as a "jQuery Node". jQuery objects are instances of jQuery which have an array-like collection internally with one or more element. We don't want to return the node, but the jQuery object itself (which the prototype methods for other plugins and built-in methods etc.).