How to wait 5 seconds with jQuery?

Built in javascript setTimeout. UPDATE: you want to wait since when the page has finished loading, so put that code inside your $(document).ready(…); script. UPDATE 2: jquery 1.4.0 introduced the .delay method. Check it out. Note that .delay only works with the jQuery effects queues.

Why does Ruby on Rails use http://0.0.0.0:3000 instead of http://localhost:3000?

Localhost means quite literally “your local host”, usually identified by 127.0.0.1 and all traffic to that address is routed via a loopback interface. If your Web server is listening for connections on 127.0.0.1, this means that it only accepts requests coming from the same host. 0.0.0.0 means that Rails is listening on all interfaces, not just the … Read more

Can I have an onclick effect in CSS?

The closest you’ll get is :active: However this will only apply the style when the mouse button is held down. The only way to apply a style and keep it applied onclick is to use a bit of JavaScript.