Quantcast

[Moo] fxSlide.slideOut() stopping events

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Moo] fxSlide.slideOut() stopping events

Jeff Dunlap
Dear MooTools users:


I am using fxSlide to open and close a div. I then added a focus and blur event to open/close the div but then experienced an issue that I believe is caused by fxSlide.slideOut() automatically stopping events down the line.

Please take a look at this fiddle:

http://jsfiddle.net/jeff_j_dunlap/h3VeF/


The fiddle is pretty clear about what problem I am having.  Please advise and thank you for your help.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Moo] Re: fxSlide.slideOut() stopping events

Jeff Dunlap
After thinking about this for some time, I came up with a 'delay()' workaround that seems to work.

http://jsfiddle.net/jeff_j_dunlap/h3VeF/1/

I am guessing that there are a bunch of better ways to do this but they are way beyond my abilities. If anyone has any comments or suggestions, I am most eager to hear from you.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Moo] Re: fxSlide.slideOut() stopping events

Jeff Dunlap
Just a side note, clicking on the google link will not work. I think google prevents itself from appearing within a frame.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Moo] Re: fxSlide.slideOut() stopping events

shoplifter
In reply to this post by Jeff Dunlap
this is because the blur event fires before your click is executed.
instead of adding the blur event to the searchfield you might want to

window.addEvent('click',function(){myVerticalSlide.slideOut();});



Am Donnerstag, 15. August 2013 19:00:59 UTC+2 schrieb Jeff Dunlap:
Dear MooTools users:


I am using fxSlide to open and close a div. I then added a focus and blur event to open/close the div but then experienced an issue that I believe is caused by fxSlide.slideOut() automatically stopping events down the line.

Please take a look at this fiddle:

http://jsfiddle.net/jeff_j_dunlap/h3VeF/


The fiddle is pretty clear about what problem I am having.  Please advise and thank you for your help.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Moo] Re: fxSlide.slideOut() stopping events

Jeff Dunlap
Excellent suggestion!

Worked perfectly except for IE but the fix was easy. Instead of using window.addEvent, I used document.addEvent and it worked perfectly in FF, IE, Chrome and Opera.

Thank you!

On Friday, August 16, 2013 8:08:57 AM UTC-5, shoplifter wrote:
this is because the blur event fires before your click is executed.
instead of adding the blur event to the searchfield you might want to

window.addEvent('click',function(){myVerticalSlide.slideOut();});



Am Donnerstag, 15. August 2013 19:00:59 UTC+2 schrieb Jeff Dunlap:
Dear MooTools users:


I am using fxSlide to open and close a div. I then added a focus and blur event to open/close the div but then experienced an issue that I believe is caused by fxSlide.slideOut() automatically stopping events down the line.

Please take a look at this fiddle:

http://jsfiddle.net/jeff_j_dunlap/h3VeF/


The fiddle is pretty clear about what problem I am having.  Please advise and thank you for your help.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Loading...