Is jquery bind()
deprecated or it can be used safely?
I see a lot of comments about bind() being deprecated in comments and answers across SO like: Jque
.bind()
and .delegate()
are deprecated as of jQuery 1.12 and 2.2. These functions work well with no warning message in 1.12 or 2.2, but will not work in next version and (of course) in 3.0.
It is strongly recommended to use .on()
instead of .bind()
and .delegate()
.
http://blog.jquery.com/2016/01/08/jquery-2-2-and-1-12-released/ https://github.com/jquery/jquery/issues/2288