Skip to content

jakobploens/jazzify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Jazzify

Jazzify is a collection of often used little helper functions. Like jQuery in easy and lightweight.

Moral License / Support me

You can buy a moral license and support me with buying me a cup of coffee via PayPal.

Functions

// Shortcut for document.find(selector)
var element = $('.selector');

// Find element(s) in given scope
element.find('.selector');

// Add className to object
element.addClass('className');

// Remove className from object
element.removeClass('className');

// Returns true if object has className
element.hasClass('className');

// Toggle a class of object
element.toggleClass('className');

// Remove object from DOM
element.remove();

// Prepend Child
element.prependChild(child);

// Add CSS to object or get style
element.css('style', 'value');

// Get or set data
element.data('name', 'value');

// Get or set attribute
element.attr('name', 'value');

// Removes attribute
element.removeAttr('name');

// Attach event handlers
element.on('event', callback);

// Loop through a NodeList with multiple elements
elements.each(function(index, element){
    // do something. element is the current element.
});

// Attach event handlers
elements.on('event', callback);

// Get first of NodeList
elements.first();

// Get last of NodeList
elements.last();

// Merge two objects
object.mergeWith(object);

About

Jazzify adds cross browser helpers and chaining functionality to vanilla JS. Like jQuery in easy and lightweight.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors