On 14 Feb, 15:26, Michael Schwarz <[EMAIL PROTECTED]> wrote:
> Hi everybody,

hi :)

> A) change
> src="/img/btn_search.gif"
> into
> src="/img/btn_search_hover.gif"
> onMouseOver and back onMouseOut

$('.hoverThis').hover(function(){
       $(this).attr('src', '/img/btn_search_hover.gif');
}, function(){
       $(this).attr('src', '/img/btn_search.gif');
});

the hover() method accepts two functions as arguments, and fires the
first on mouseover and the second on mouseout.
it's a shorthand method for
$('.hoverThis').bind('mouseover', function(){
      $(this).attr('src', '/img/btn_search_hover.gif');
}).bind('mouseout', function(){
      $(this).attr('src', '/img/btn_search.gif');
});

> B)
> change value="search for..." onFocus

$('#searchFor').focus(function(){
      $(this).val('');
});

hope this helps :)

Reply via email to