javascript - show() is undefined because of custom plugin -


i wrote plugin catch show event div_loading_page element:

(function ($) {         $.each(['show'], function (i, ev) {             var el = $.fn[ev];             $.fn[ev] = function () {                  this.each(function () {                     if (this.id == 'div_loading_page') {                         $(this).trigger(ev);                         return false; // break out of loop                     }                 });                 //alert(this.id);                 el.apply(this, arguments);             };         });     })(jquery); 

it's working fine because of following error:

$cluetiptitle.show() undefined , cluetip jquery plugin. idea how can resolve conflict?

change:

el.apply(this, arguments); 

to

return el.apply(this, arguments); 

this ensure original function's return value reserved , not cause unexpected behavior


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -