Ali Ashgar Ali Ashgar - 5 months ago 58
Javascript Question

I want give alias to jquery builtin function

I want to rename the built in function of jquery like for ajax i want to replace It with MyAjax function I call also call it will its previous name.



So i want to call in this way. it can be possible or not?

Answer Source

var MyAjax = $.ajax; // this statement creates copy of original function with new alias or name due to this original function remain same so that's why it is possible to call function using original name after assigning it to new alias

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download