Ofcourse, less the DOM will get traversed quick will be the output. Therefore here is the trick to cache the element in jquery so as to reduce traversing. Here we go: Wrong Way 1 2 3 var myElement = $(’#anyElement’); $(’#anyElement’).show(); $(’#anyElement’).addClass(’anyClass’); . Right Way 1 2 var myElement = $(’#anyElement’); myElement.show().addClass(’anyClass’); And its done
Today working on a simple ajax jquery call, I was searching for setting context in ajax function suddenly one my javascript master came and wrote a code below, and it was done. Its look like this: 1 2 3 4 5 6 7 8 9 10 $(’#click_me’).function(){ $.ajax({ type: ‘POST’, data: ‘value=34′, context: $(this), success: [...]
Content sliders increase the usability of a web design. Dynamic auto sliding content sliders are a lot popular on numerous websites over the web. If you are upset from old plugins , here is the list of 10 fresh jquery plugins. 1. Sliding Panel Visit Site . 2. Smooth Div Scroll Visit Site . 3. [...]
Since Jquery is lightweight and fast therefore very much popular. Today I have collected 11 latest jquery plugins which may enhance your web application interface. Have a look! 1. Filter Images View Demo . 2. Jtrack View Demo . 3. Pajinate View Demo . 4. Image Zoomer View Demo . 5. Micro Gallery View Demo [...]
Image flipping becoming popular these days and many major blogs and websites already using it. Flips add good user interface experience and therefore giving better feel and look to web application. Here is the collection of 10 best jquery flip plugins which may be implemented in your upcoming projects.
A slideshow is a display of a series of chosen pictures, which is done for artistic or instructional purposes. And if the slideshow is cool and sexy , it would surely add glamor and feeling of impressiveness. Here is the list of 14 cool galleries and slideshows using javascript which may addimpressive looks to your [...]
Today I have tried to make auto-complete using jquery and css inspired by facebook. Auto-complete functionality can be used in filling e-mail ids or maybe story tags. The implementation is very easy.
From my previous article of content slider , today I am using same HTML and CSS but producing fade effect rather than slide one. This can be easily done by adding two simple functions on the current jquery code. Lets see how I have achieved this. . Here is the DEMO . HTML setup Simply [...]
Sometimes we need to fill two divs simultaneously using ajax. Generally , we use two different ajax calls to achieve this rather knowing the fact that it can also be done using single ajax call. One simple example is better than hundered words. Lets setup an example.
The things that bugs a web developer is the way they have to find the right documentation for what we search for. For example if we try to search function bind() it may produce over 100 matches before the actual function we are looking for. So as to minimize these redundancy I have collected 6 [...]
Form validation is one of the most important aspect on any web application. More the form is secure more secure will be the application. So as to validate form using jquery , is really simple and can be highly customize.