Extending JQuery

To extend an existing JQuery object in your javascript by doing the following.




<script type="text/javascript" language="javascript">
(
function($) {
function DoMyFunction1(response) {
}


function DoMyFunction2(response) {
}

$.extend({
DoFunction1:
function(response) { DoMyFunction1(response); },
DoFunction2:
function(response) { DoMyFunction2(response); }
});




 
}
)($);

</script>

To use the JQuery extended functions:

$.DoFunction1(myArg);
$.DoFunction2(myArg);
Ebook Download
View all
Learn
View all