Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.
/ lazyHandler Public archive

A jQuery plugin that provides more performance on click handlers

Notifications You must be signed in to change notification settings

muratcorlu/lazyHandler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lazyHandler for jQuery

lazyHandler is a jQuery plugin that gives ability to add event handlers to any DOM elements more efficiently and gives more "onload" performance on web pages that has lots of event bindings.

What is changed?

lazyHandler is familiar with jQuery's standart event binding convention. For example, in standart jQuery you will add an event handler like:

$('.someClass').click(function(event) {
        // Some good stuff
})

If you want to use lazyHandler for this binding, add 3 chars only:

$.lh('.someClass').click(function(event) {
        // Some good stuff
})

Also you can use "bind" method:

$.lh('.someClass').bind('click', function(event) {
        // Some good stuff
})

What about my "live" bindings?

lazyHandler is already handles events like jQuery's live method.

Can I use all events with lazyHandler?

No. You can use only click, dblclick, mouseup, mousedown, keydown, keyup and keypress events with lazyHandler. Only click event has a specific function. You can use others with bind method.

How much it cost?

Build version(Obfuscated with YUI Compressor) is 363 bytes!

About

A jQuery plugin that provides more performance on click handlers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published