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
It's not deprecated in jQuery 1.1. There is actually no difference (apart form it's usage) in version jquery 1.11.3 if you inspect the declaration of the .bind
event you can see it simply calls .on
:
bind: function( types, data, fn ) {
return this.on( types, null, data, fn );
},
deprecated or it can be used safely?
As others say, no it's not deprecated and is safe, it's just a bit redundant now and only exists for backwards compatibility.
Though it does seem to of been marked as deprecated in later versions of jquery now