Discussion:
slideDown is not working properly, after double click
Ranjan
2008-11-26 11:02:09 UTC
Permalink
Hi All,
Sorry for my noviceness.
I have used slideDown and slideUp in my application. It is working
fine in single clicking. If I double click during slideDown/slideUp,
after that it is showing problem. I am using Mozilla Firefox 3 Beta 5.
Needing your 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 ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---
Per Cederberg
2008-11-26 14:04:29 UTC
Permalink
Yes, one needs to cancel the previous effect before starting a new one.

Cheers,

/Per
Post by Ranjan
Hi All,
Sorry for my noviceness.
I have used slideDown and slideUp in my application. It is working
fine in single clicking. If I double click during slideDown/slideUp,
after that it is showing problem. I am using Mozilla Firefox 3 Beta 5.
Needing your 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 ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---
Ranjan
2008-12-01 12:49:36 UTC
Permalink
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 ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---
Per Cederberg
2008-12-01 14:18:52 UTC
Permalink
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
Post by Ranjan
Hi,
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 ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---
Ranjan
2008-12-02 07:00:01 UTC
Permalink
Hi Per,
Thanks a lot for your cooperation.
I changed my code as per your instruction, but still it doesn't work
properly.
Lastly found some Mochikit code, that solved my problem.

code:
slideDown('filter_options', {'queue': 'break'});

Thanks,
Ranjan

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

Loading...