-
Jul 1st, 2011, 12:12 PM
#1
Thread Starter
Addicted Member
jquery focus questions
ok its been a while.
im helping with a very important website for a tribal entity.
right now we have 2 popups both fired with mousover events.
we want to click anywhere outside of the popup for them to fire the close event.
the only way i can think about doing this is if we set the focus on the mousover event and firing the closing event with the .blur
can anyone give me an example of setting focus to soemthing with the jquery mousover event?
languages asp.net (2008) jquery
Visual studio 2008
Last edited by KingSatan; Jul 1st, 2011 at 12:14 PM.
Reason: forgot some things
-
Jul 4th, 2011, 01:14 AM
#2
Re: jquery focus questions
You should not [and possibly cannot] use the focus/blur events for this. Not all DOM elements are capable of receiving focus [in a useful manner], and I can imagine some buggy scenarios if you tried it.
A popular approach to this situation is to create a 100% width, 100% height div element - usually semi-transparent in color (like 50% opacity) - that overlays the area behind the pop-up. To that div, you assign a click event that removes both the overlay div and pop-up.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|