[mochikit] Re: slideDown is not working properly, after double click

2008-12-01 Thread Ranjan

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
-~--~~~~--~~--~--~---



[mochikit] Re: slideDown is not working properly, after double click

2008-12-01 Thread Per Cederberg

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
-~--~~~~--~~--~--~---



[mochikit] Re: slideDown is not working properly, after double click

2008-12-01 Thread Ranjan

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 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
-~--~~~~--~~--~--~---