-
26 Apr 2011 6:49 AM #1
Mouseover delay
Mouseover delay
I want an pop up to open only if the mouse been over a link for 500 ms. How do i do that? Right now it fires immediately..
-
26 Apr 2011 8:46 AM #2
If you're talking about ToolTips, you can set global options to affect all ToolTips:
Note that you can set a 'dismissDelay: 0' if you want the user to manually dismiss the tooltip, via a mouse click.Code:Ext.QuickTips.init(); Ext.apply(Ext.QuickTips.getQuickTip(), {showDelay: 500, dismissDelay: 5000});
-
26 Apr 2011 8:54 AM #3
no not a tooltip, i want a window to pop up.
-
27 Apr 2011 4:27 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 436
If you look at the addListener method you will see the different options you can add in the object. You can use things like delegate that allow you to have one listener but for multiple targets in the el. I think delay is the one you want, either that or buffer.Code:cmp.mon(el, { delay: 200, //in miliseconds mouseover: someFunc });Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
27 Apr 2011 4:35 AM #5
-
27 Apr 2011 9:15 AM #6
this doesn't seem to work for me.. the event fires after a delay. I want the window to open only if i have hovered over the link for over 500 ms. It shouldn't open otherwise. I tried doing this but the mouseout event is inconsistent. It fires when I bring the mouse over the link AND when I move out of the link.
This is what i tried to do:
appointmentIcon is a <li> element in the html file.
Code:var appointmentIcon = Ext.get('appointmentIcon'); appointmentIcon.on({ 'mouseover' : { fn : function() { Ext.Msg.alert('MouseOver!', 'Fired!'); }, buffer : 500 }, 'mouseout' : { fn : function() { appointmentIcon.swallowEvent('mouseover', true); } } });
-
27 Apr 2011 9:18 AM #7Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 436
That gets a little tricky and something that an option to a listener is not going to be able to handle.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
27 Apr 2011 9:25 AM #8
could you point me in the right direction? I'll check out how the tooltip is designed.. that does what I want to achieve here.
-
27 Apr 2011 9:27 AM #9Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 436
On mouseover I would set a time when the event happened so you can reference it with the mouseout event and then do a calculation to see if it has been 500ms. Make sure to test it with the mindset of trying to break it. It should work no problem but test it never the less.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
27 Apr 2011 9:29 AM #10Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 436
Wait, you are using a ToolTip or QuickTip? If you are, there is a showDelay config that should do what you want I think. If you aren't then do what I said before.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
Similar Threads
-
Add mouseover Event to text box (or element which not contain mouseover event)
By JazzMan88 in forum Ext 3.x: Help & DiscussionReplies: 4Last Post: 2 Mar 2011, 9:55 PM -
problem: mouseover calling twice & delay question
By headroot in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 21 Jun 2009, 2:00 AM -
too much delay
By zeta28 in forum Ext 1.x: Help & DiscussionReplies: 0Last Post: 16 Jan 2008, 4:37 AM -
Delay before page can be used
By fwabbly in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 10 Dec 2007, 8:53 AM -
Why the Delay
By ekatz in forum Community DiscussionReplies: 1Last Post: 13 Aug 2007, 12:08 PM


Reply With Quote