I'm trying to show up a container if a input field gets the focus and - that's the actual problem - hide the container if focus is lost. Is there an opposite event for jQuery's focus?
Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Monday, June 11, 2012
jQuery lose focus event
Tuesday, May 29, 2012
How to debug Javascript/jQuery event bindings with FireBug (or similar tool)
I need to debug a web application that uses jQuery to do some fairly complex and messy DOM manipulation. At one point, some of the events that were bound to particular elements, are not fired and simply stop working.
Sunday, May 27, 2012
event.preventDefault() vs. return false
When I want to prevent other event handlers from executing after a certain event is fired, I can use one of two techniques. I'll use jQuery in the examples, but this applies to plain-JS as well:
Friday, May 18, 2012
Pass parameters in setInterval function
How to pass parameter while call a function using setInterval. viz. setInterval('funca(10,3)',500); is incorrect.
Thursday, May 17, 2012
On - window.location.hash - change?
I am using Ajax and hash for navigation. Is there a way to check if the window.location.hash changed like this?
Sunday, May 13, 2012
Does the jQuery .unbind() method only work on jQuery created events?
I am trying to unbind all event handlers for all elements that are inside a particular container. Like a DIV. But those events have been bound/registered not using jQuery. Some are bound the manual way with onclick="...." or using regular native JavaScript.
Detecting a image 404 in javascript
After a user uploads a file we have to do some additional processing with the images such as resizing and upload to S3. This can take up to 10 extra seconds. Obviously we do this in a background. However, we want to show the user the result page immediately and simply show spinners in place until the images arrive in their permanent home on s3.
Wednesday, May 2, 2012
can JavaScript flow of execution be interrupted?
I've always thought that, since JavaScript was single-threaded, I could attach event handlers without worrying about the handlers getting executed while I was in the middle of executing code. To my surprise, I found that they could. According to this answer, the 'Unresponsive Script' dialog box can cause events to be raised while the script is still running.
Tuesday, May 1, 2012
In web browser, what"s the difference between onblur and onfocusout?
If it is the same, then why there are two of this kind of event.
Monday, April 23, 2012
Javascript global error handling
I would like to catch every undefined function error thrown. Is there a global error handling facility in Javascript? The use case is catching function calls from flash that are not defined.
Intercept page exit event
When editing a page within my system, a user might decide to navigate to another website and in doing so could lose all the edits they have not saved.
Thursday, April 19, 2012
Best way to ask confirmation from user before leaving the page
I am currently building a registration page where if the user leaves, I want to pop up a CSS box asking him if he is sure or not. I can accomplish this feat using confirm boxes, but the client says that they are too ugly. I've tried using unload and beforeunload, but both cannot stop the page from being redirected. Using those to events, I return false, so maybe there's a way to cancel other than returning false?
How to detect escape key press with javascript
Possible Duplicate:
Which keycode for escape key with jQuery
How to detect escape key press in IE, Firefox and Chrome? Below code works in IE and alerts 27 , but in firefox it alerts 0
Friday, April 6, 2012
Pass mouse events through absolutely-positioned element
I'm attempting to capture mouse events on an element with another absolutely-positioned element on top of it. Right now, events on the absolutely-positioned element hit it and bubble up to its parent, but I want it to be "transparent" to these mouse events and forward them on to whatever is behind it. How should I implement this?
Thursday, March 8, 2012
GWT Custom Event Handler
Can someone give me an example of creating a custom set of an Event and a Handler. Say you have a Person object that you want your widgets to know if it got updated.
Friday, February 17, 2012
jquery on data-xxxx modified event?
Is there a way of catching the modification of a specific data attribute (i.e. 'data-whatever')? My first thought was to go with DOM mutation observer but was wondering if there's any 'easier' way through jQuery?
Friday, January 20, 2012
What javascript event gets fired when ios safari gets called from another app
I'm working on a mobile website / iPhone app combination. Upon entering the mobile website, I prompt the user to 'go to the app', 'download the app', or 'use mobile website'.
Friday, January 13, 2012
jQuery function is not working as i planned, DIVs just disappear on click
I have a script here, and it works amazing, except for one small detail. It basically runs as click function that fades in and out certain DIVs on the click of a link.