rgrove / jquery-yui3-rosetta-stone

A guide to idioms in YUI 3 and jQuery.
BSD 3-Clause "New" or "Revised" License
65 stars 20 forks source link

Replace .bind() by .on() #26

Open webketje opened 11 years ago

webketje commented 11 years ago

In this statement, under the Events section, .bind() should be replaced with .on():

//Alternatively, you can use the bind() method $('#foo').bind('click', fn);

For reference: http://api.jquery.com/bind/

As of jQuery 1.7, the .on() method is the preferred method for attaching event handlers to a document.