JavaScript Coder

jquery

jQuery Popups

JavaScript popups are handy to display help information or to zoom in an Image. There are different types of Popups. The first type is a new browser window opened using the window.open() function. Such types of Popup windows were overused and exploited by many websites during the earlier days of the web.This resulted in the later versions of browsers blocking popup windows. Eventually, popup windows became almost extinct now. Automatically opening popup windows is considered a very bad practice.

Continue Reading →

jQuery: applying selector within 'this'

When you handle events for a particular element, it is often required to make a change only within children of the element. Here is how to do it. Suppose this is the HTML code <h2>Select the services you want:</h2> <ul id='services'> <li><img src='tick.gif'>Build a Website</li> <li><img src='tick.gif'>Page design</li> <li><img src='tick.gif'>Flash banners</li> <li><img src='tick.gif'>SEO</li></ul> </ul> When someone clicks on each of the service, the image is to toggle. Here is the jQuery code to do that

Continue Reading →