<!DOCTYPE html PUBLIC "- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Overriding jQuery Methods</title>
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript">
(function(){
var originalRemoveMethod = jQuery.fn.remove;
jQuery.fn.remove = function(){
console.log( "Override method" );
originalRemoveMethod.apply( this, arguments );
}
})();
$(function(){
$( "a" )
.attr( "href", "javascript:void( 0 )" )
.click(
function(){
$( this ).remove();
return( false );
}
)
;
});
</script>
</head>
<body>
<h1>
Override a jQuery Method
</h1>
<p>
<a>Remove Me 1</a>
<a>Remove Me 2</a>
<a>Remove Me 3</a>
</p>
</body>
</html>