Friday 15 August 2014

javascript - Remove function from a jquery object -


How do I remove a function from a jquery object? For example, I have

  $ ('# element'). Func = function {// function body goes here}   

and later I func to $ ('# element') wants to remove I've tried delete but this does not work thanks.

How about it?

  $ ('# element') .fn.func = null;   

or $ ('# element'). Prototype.funk = null;

or Delete $ ('# element'). Fn.func;

or Delete $ ('# element'). Prototype.funk;

To know what a prototype is, take a look here:

No comments:

Post a Comment