This is a library of utilities for JavaScript and jQuery, which includes tools for data validation, text formatting, tooltips, positioning elements, JSON manipulation, cloning objects, sorting arrays, resource injection, among others.
Go to documentation site to see the API reference and examples:
The library has a dependency on jQuery 1.8+ which must be loaded before jsu-library.
It also requires some CSS rules for methods showing tooltips, loadings, and others.
If jQuery.ui.position is available, all tooltips will be positioned using jQuery.ui, otherwise an internal implementation for positioning will be used.
(function() {
// None of below settings are mandatory.
// We set the container for dynamic HTML
jsu.wrapper = "#main-section";
// We set the language setting
jsu.regional.set(jsu.regional.english);
// Sets the default position for all tooltips
jsu.settings.position = {
at: "left bottom",
my: "left+2 top+5"
};
// Add your code...
})();
It is considered inputType.isText any of the following DOM
elements:
<textarea></textarea>
<input type="text" />
<input type="password" />
<input type="number" />
<input type="search" />
<input type="tel" />
<input type="url" />
<input type="email" />
<input type="datetime" />
<input type="datetime-local" />
<input type="date" />
<input type="time" />
<input type="month" />
<input type="week" />
<input type="file" />
If you discover a bug, please let me know here on GitHub!
https://github.com/jherax/js-utils/issues
The releases will be numbered with the follow format:
<major>.<minor>.<patch>
And constructed with the following guidelines:
- Breaking backwards compatibility bumps the major
- New additions without breaking backwards compatibility bumps the minor
- Bug fixes and misc changes bump the patch
For more information on semantic versioning, please visit http://semver.org/
Developed and maintained by David Rivera (jherax stackoverflow | careers | wordpress)
JSU Library is released under the MIT license. See LICENSE file for details.