how to write functions in jquery code example
Example: how to create jquery function
(function( $ ){
$.fn.myfunction = function() {
alert('hello world');
return this;
};
})( jQuery );
$('#my_div').myfunction();
(function( $ ){
$.fn.myfunction = function() {
alert('hello world');
return this;
};
})( jQuery );
$('#my_div').myfunction();