Here’s a cool jQuery snippet that you can use to create a click counter. The way it works is that each time an element is clicked, the counter (which starts at 0) goes up by one. The counter can be applied to the clicking of any particular elements or multiple elements, and you can choose whether …
jQuery
jQuery JavaScript Library – Animations, Event Handler, AJAX and JSON
jQuery is a JavaScript library that greatly reduces the work of encoding and allows us to do complicated things like animations, event handling, use of AJAX , the JSON object , etc.., in an easy way. jQuery can run on any browser such as FireFox, Internet Explorer, Safari, Chrome, etc.., unimpeded. To start with JQuery we need the jquery.js file in …
Loading XML using jQuery AJAX
In our previous articles, we discussed about how jQuery AJAX works and also various jQuery global AJAX event handlers available in jQuery. In this article, we’ll focus on accessing an XML document residing at the server, reading and displaying content of the XML using jQuery AJAX. In the following code example, we send an AJAX …
Manipulating Styles with jQuery
In the previous article we discussed about manipulating element CSS Classes using jQuery. In this article we’ll explore how to read or manipulate style properties of elements using jQuery methods. The CSS Classes defined using class attribute can be used to control the look and feel of an element. A predefined CSS definition matched with …
CSS Class Manipulation with jQuery
Each HTML element can have a CSS class attribute which controls the look and feel of the element. The CSS class of an element corresponds to the style sheet definition. Style sheets are managed separately from HTML or any other presentation code for better maintainability. Often need arises to manipulate these class attributes to assign …
jQuery Event Handling – Form Events
We discussed about mouse events, keyboard events in previous articles. This article discusses about form events jQuery supports. jQuery has five form events namely blur(), change(), focus(), select() and submit(). These events are triggered when we interact with HTML form elements like moving away from the element or when the element loses its focus, changing …
Refreshing DIV Content with jQuery
Frequently we may have to add or update content of the HTML elements in the web pages. The data we need to add or edit may come from various sources dynamically. jQuery has number of utility methods to achieve this goal. We can add elements or edit element’s data using jQuery. For instance, we can …
jQuery Selectors : ID selector, Class selector and Element selector
We use jQuery selectors to identify, select and manipulate the elements of the HTML document. Using jQuery selectors we can identify an element with its ID and class. Once we identify the element(s) we want, we can read the element’s attributes along with attribute values, apply style sheets, hide or show element content based on …