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

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -