Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A first pass at making sure that all the setter function arguments re…
…ceive the index of the element and a relevant value to work with. Fixes #5763.
- Loading branch information
Showing
3 changed files
with
72 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
600d314
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference, these are all the setter methods I noticed that take a function:
css, attr
val, html, text
appendTo, append, prependTo, prepend,
insertBefore, before, insertAfter, after, replaceAll, replaceWith
wrap, wrapAll, wrapInner
addClass, removeClass, toggleClass
600d314
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And now offset as well.
Out of these the follow receive the previous value: css, attr, val, html, text, append, prepend, addClass, removeClass, toggleClass, and offset.
600d314
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also appendTo, prependTo, insertBefore, insertAfter, and replaceAll do NOT take a function (well, they can, but it won't do as you would expect, heh).