Tag Archives: HTML

Javascript – Preload Images When the HTML Page is Loaded

With Javasript and jQuery, we could manipulate images at client side. For example, some images are shown on a mouse hover effect. But if that image is too large, there may be some latency before the image could be rendered. We’d better preload those images to minimize the time delay. Continue reading Javascript – Preload Images When the HTML Page is Loaded

CSS – Missing HTML Element in Internet Explorer 7

It’s about the greatest browser, Internet Explorer, again!

In IE7, sometimes i found that some HTML elements are gone. But if i uncheck and recheck any CSS style in Developer Tool, they will return back on the screen. Continue reading CSS – Missing HTML Element in Internet Explorer 7

jQuery & Javascript – Capture the Browser or Tab Closed Event

I was working on a WordPress project which i need to clear the PHP session when the browser or browser tab is closed. Although Javascript provides the window.onbeforeunload event but it will be triggered even whenever you leave the website. Finally i got a simple solution from Daniel Melo in StackOverflow. The following code required jQuery and i have included the Google one in the HTML.

In your web root, create the js/check_browser_close.js. Continue reading jQuery & Javascript – Capture the Browser or Tab Closed Event