Thanks Erik,
But how do i rebind something which has been unbound?
Erik Beeson wrote:
How about:
$('div#topLineHover').one('mouseover', function() {
$('#topLine').slideDown('slow');
});
Or:
$('div#topLineHover').bind('mouseover', function() {
Does that mean i have to repeat the code or is there a way to do it without?
Gordon wrote:
The same way you bound it in the first place.
On May 29, 8:12 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Thanks Erik,
But how do i rebind something which has been unbound?
Erik Beeson wrote:
Yeah, you have to repeat the code. You could put the code in a
function though.
function doSlide ()
{
$('#myLine').slideDown ('slow');
}
$('div#topLineHover').bind('mouseover', doSlide);
On May 29, 11:03 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
Does that mean i have to repeat the
Alternatively, instead of unbinding the event, you could have your
event handler check for some condition:
$('div#topLineHover').bind('mouseover', function() {
if($('#topLine').is(':hidden')) {
$('#topLine').slideDown('slow');
}
});
Also, when selecting by ID, no need to specify
How about:
$('div#topLineHover').one('mouseover', function() {
$('#topLine').slideDown('slow');
});
Or:
$('div#topLineHover').bind('mouseover', function() {
$('#topLine').slideDown('slow');
});
And:
$('div#topLineHover').unbind('mouseover');
--Erik
On 5/28/07, [EMAIL
5 matches
Mail list logo