signalsjs
v1.1.19
Published
A light javascript toolset for working with plain old javascript. Focusing on browser compatibility down to IE8 and abstracting common patterns to write less code.
Readme
npm install signalsjs
Function Reference
find(selector) [chainable]
animate() [chainable] [polyfill-raf] [easing]
ajax()
Class Helpers
hasClass(class)
addClass(class) [chainable] [supports multiple]
removeClass(class) [chainable] [supports multiple]
swapClass(removeClass, addClass) [chainable] [supports multiple]
toggleClass(class) [chainable]
String Helpers
capitalize(log) [chainable] [supports multiple]
Boolean helpers
isWidthLessThan(width)
isTouchDevice()
isElementInViewport()
Event Helpers
addListeners(ev, func, useCapture) [chainable] [supports multiple]
noReturn(e)
Element Helpers
getPosition()
getTransitionDuration()
Changelog
March 27th 2015 v1.1.17 => v1.1.19
- Fixed a bug with the
findmethod which was causing theelproperty to be set to an array instead of null if certain types of selectors were used and their items not found.
March 19th 2015 v1.1.13 => v1.1.17
- If selecting an element that doesn't exist, Sjs(obj).el will be equal to
nullinstead ofnoneor an empty nodeList - added a
toggleClassmethod as submitted bySam Hoult. Only supports one element for now, could be extended to support multiple
February 4th 2015 v1.1.11 => v1.1.13
- Add'ed Uglified file & Uglify command
February 4th 2015 v1.1.9 => v1.1.11
- intigrated easing & requestAnimationFrame polyfill into file so eliminate the need for extra files
February 3th 2015 v1.1.3 => v1.1.9
- Formatting and getting everything setup in NPM
January 26th 2015 v1.1.2 => v1.1.3
- Replaced .trim() in
removeClasswith a regex for ie8 compatibility
January 15th 2015 v1.1.1 => v1.1.2
- Added commonjs support with AMD / Native environments as the backup
January 14th 2015 v1.1.0 => v1.1.1
- Altered addClass, removeClass, capitalize & getPosition functions to not modify
this.eland instead create a scoped copy for processing. This fixes a bug that chancesSignalsJs.eldown the logic chain when running multiple functions over the same instance. getPosition had a while loop removed, not sure why it was there in the first place.
Uglify Command
uglifyjs Signals.js -m -c sequences=true,dead_code=true,conditionals=true,booleans=true,unused=true,if_return=true,join_vars=true,drop_console=true -o Signals.min.js
