javascript - jQuery .delegate() and .undelegate() is not working in chrome 56 and above versions -
please let me know alternate function this..
$("#_body").undelegate('click').delegate(".class> a",'click',function(){
i want toggle portlet on live click.
thanks
try on()
, off()
like:
$("#_body").off('click').on(".class> a",'click',function(){ // code here });
using jquery on()
in jquery 1.7, on() method introduced effort simplify , merge event bindings functions 1 unified consistent api. if interested see how on() replaces functionality of these event methods, open jquery 1.7.1 source code (https://github.com/jquery/jquery/blob/1.7/src/event.js#l965) , find bind(), live() , delegate() point on() method.
Comments
Post a Comment