aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes/classes.js
Commit message (Collapse)AuthorAgeFilesLines
* Core: Use named exports in `src/`Michał Gołębiowski-Owczarek2023-09-121-3/+3
| | | | | | | | | The `default` export is treated differently across tooling when transpiled to CommonJS - tools differ on whether `module.exports` represents the full module object or just its default export. Switch `src/` modules to named exports for tooling consistency. Fixes gh-5262 Closes gh-5292
* CSS: Skip falsy values in `addClass( array )`, compress codeMichał Gołębiowski-Owczarek2022-01-241-40/+44
| | | | | | | | | | | | | | | This change makes jQuery skip falsy values in `addClass( array )` & `removeClass( array )` instead of stopping iteration when the first falsy value is detected. This makes code like: ```js elem.addClass( [ "a", "", "b" ] ); ``` add both the `a` & `b` classes. The code was also optimized for size a bit so it doesn't increase the minified gzipped size. Fixes gh-4998 Closes gh-5003
* Attributes: Drop the `toggleClass(boolean|undefined)` signatureMichał Gołębiowski-Owczarek2020-09-011-42/+14
| | | | | | | The behavior of this signature is not intuitive, especially if classes are manipulated via other ways between `toggleClass` calls. Fixes gh-3388 Closes gh-4766
* Build: Correct code indentations based on jQuery Style GuideWonseop Kim2020-05-051-3/+3
| | | | | | | | 1. Correct code indentations based on jQuery Style Guide (contribute.jquery.org/style-guide/js/#spacing). 2. Add rules to "src/.eslintrc.json" to enable "enforcing consistent indentation", with minimal changes to the current code. Closes gh-4672
* Core: Migrate from AMD to ES modules 🎉Michał Gołębiowski-Owczarek2019-11-181-10/+5
| | | | | | | | | | | | | | | | | | | | | | Migrate all source AMD modules to ECMAScript modules. The final bundle is compiled by a custom build process that uses Rollup under the hood. Test files themselves are still loaded via RequireJS as that has to work in IE 11. Tests can now be run in "Load as modules" mode which replaces the previous "Load with AMD" option. That option of running tests doesn't work in IE and Edge as it requires support for dynamic imports. Some of the changes required by the migration: * check `typeof` of `noGlobal` instead of using the variable directly as it's not available when modules are used * change the nonce module to be an object as ECMASscript module exports are immutable * remove some unused exports * import `./core/parseHTML.js` directly in `jquery.js` so that it's not being cut out when the `ajax` module is excluded in a custom compilation Closes gh-4541
* Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJSMichał Gołębiowski-Owczarek2019-04-291-5/+4
| | | | | | | | | | | Also, update support comments format to match format described in: https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-69379197 with the change from: https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-448998379 (open-ended ranges end with `+`). Fixes gh-3950 Fixes gh-4299 Closes gh-4347
* Core: deprecate jQuery.isFunctionJason Bedard2018-01-151-4/+5
| | | | Fixes gh-3609
* Attributes: allow array param in add/remove/toggleClassTimmy Willison2018-01-081-8/+19
| | | | | | | | | +30 bytes instead of +182 Thanks to @faisaliyk for the first pass on this feature. Fixes gh-3532 Close gh-3917
* Core: rnotwhite -> rhtmlnotwhite and jQuery.trim -> stripAndCollapseTimmy Willison2016-09-151-17/+12
| | | | | | | | | | | | - Renames and changes rnotwhite to focus on HTML whitespace chars - Change internal use of jQuery.trim to more accurate strip and collapse - Adds tests to ensure HTML space characters are retained where valid - Doesn't add tests where the difference is inconsequential and existing tests are adequate. Fixes gh-3003 Fixes gh-3072 Close gh-3316
* Build: Put all AMD modules in "src/" in strict modeMichał Gołębiowski2016-04-251-0/+2
| | | | Fixes gh-3073
* Revert "Attributes: Remove undocumented .toggleClass( boolean ) signature"Timmy Willison2016-01-071-17/+52
| | | | | | This reverts commit 53f798cf4d783bb813b4d1ba97411bc752b275f3. - Turns out this is documented, even if not fully. Need to deprecate before removal.
* Attributes: removeClass() -> attr("class", "")Thomas Tortorini2015-10-181-23/+21
| | | | | | - Classes simpliciation Close gh-2465
* Attributes: Use simpler boolean check vs a function callDave Methvin2015-10-181-5/+2
| | | | Ref gh-2491
* Attributes: Remove undocumented .toggleClass( boolean ) signatureDave Methvin2015-10-181-54/+22
| | | | | Fixes gh-2491 Close gh-2618
* Build: Update jscs and lint filesOleg Gaidarenko2015-09-071-18/+20
| | | | Fixes gh-2056
* Attributes: add SVG class manipulationTimmy Willison2015-05-121-29/+43
| | | | | | | | | - Note: support for SVG is limited in jQuery, but this is one area where the cost vs benefit ratio was acceptable. Fixes gh-2199 Close gh-2268
* Core: Standardize indexOf comparisonsRichard Gibson2015-01-101-2/+2
| | | | | | | | not present: `< 0` present: `> -1` at index: `=== N` Closes gh-1984
* Core: Drop strundefined variableChris Antaki2014-09-021-3/+2
|
* Build: update grunt-jscs-checker and pass with the new rulesTimmy Willison2014-07-171-6/+12
|
* Support: clean up comments and Support notationDave Methvin2014-06-101-4/+4
| | | | Closes gh-1577
* Reduce size by reordering variable declarationsChris Antaki2013-12-161-4/+4
| | | | Close gh-1421
* Separate jQuery.fn.init into its own module (for lighter core dependencies ↵Timmy Willison2013-09-091-1/+2
| | | | across all modules)
* Fix #14164: assign className in addClass/removeClass only if changed. Close ↵Jeremy Dunck2013-08-191-4/+13
| | | | gh-1331.
* AMD-ify jQuery sourcegit s! Woo! Fixes #14113, #14163.Timmy Willison2013-08-151-0/+148