Lovely.IO

The Next Generation of Front-Side

Package Info

Links
Size
730 Bytes (gzipped)
Tags
Core, DOM, STL
Author
Nikolay Nemshilov
License
MIT
Versions
CDN Links
Dependencies

STL Syntax Sugar

This module provides some syntax sugar features for the dom module. Basically those are the onEventname shortcuts for dom wrappers.

$('div.something').onClick('toggleClass', 'clicked');

new Element('div').onMouseover(function(event) {
  // do something
});

This package also provides quick String#toSomething() shortcuts

"div.something".html();

// same as
$("div.something").html();

And quick UJS definitions

"div.something".on('click', 'toggleClass', 'marked');

// same as
$(document).delegate('div.something', 'click', 'toggleClass', 'marked');

License & Copyright

This module is published under the terms of the MIT License

Copyright (C) 2011 Nikolay Nemshilov