Hello world</div>
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.js" type="text/javascript">
</script>
<script type="text/javascript">
(function($)
{
$.fn.helloworld = function()
{
return this.each(function()
{
$('div').css('color', 'red');
alert('Hello world');
});
};
})(jQuery);
$('.Test').mouseover(function()
{
$('.Test').helloworld();
});
</script>
Reference:
No comments:
Post a Comment