Store your old effect in a global variable or similar:

var currentEffect = null;

Then finish off any old effect before starting new ones:

if (currentEffect) {
    currentEffect.finish();
}
currentEffect = slideDown(...);


Cheers,

/Per

On Mon, Dec 1, 2008 at 1:49 PM, Ranjan <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I have written as follows:
>
> function toggleFilter(opt, e) {
>        var filter_options = getElement('filter_options');
>        var show_filter = getElement('show_filter');
>        var hide_filter = getElement('hide_filter');
>
>        if (opt == 'show') {
>                if (e != null)
>                        e.cancel();
>                effect = slideDown('filter_options');
>                show_filter.style.display='none';
>                hide_filter.style.display='inline';
>        }
>        else {
>                if (e != null)
>                        e.cancel();
>                effect = slideUp('filter_options');
>                hide_filter.style.display='none';
>                show_filter.style.display='inline';
>        }
> }
>
> But it is not working, when I double click. Is there any mistake,
> please help
>
> Thanks,
> Ranjan
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to