Hello to everyone. Here’s an interesting article for those who are interested in web animation etc. We got a very interesting tool for this purpose named JQuery. JQuery is a JavaScript library which include built in functions to perform various tasks, which are performed difficulty by normal JavaScript. In JavaScript, we have to write long lines of code to make our creative idea alive. But JQuery makes it so easy by introducing some brand new functionalities like animations, ease of getting every element on the HTML page etc. In simple words, JQuery is a box of magic which makes our creative ideas alive by a few number of lines of code. With JQuery, you can develop Amazing Sliders, Animated MenuBars, Animations, Dynamic Webpages etc.
Now lets discuss the implementation and advantages of the JQuery:
- It is very easy to implement a JQuery code in your web page. Just we have to do is to include the core JQuery JavaScript file in the HTML page where we want to implement JQuery. You can get a copy of that file from JQuery Website by clicking here.
And then to include this file in the web page. Here’s the code:
<HTML> <HEAD> <SCRIPT src="JQuery-File-Path"> </SCRIPT> </HEAD> </HTML>
- Now, how to start your code. As javascript, you can start your code anywhere, in the head or in the body. In the JavaScript you need to do the work by binding events, if you write your code in the <HEAD> section. But in JQuery, You can easily bind your codes by using some callback functions. Here’s a example code:
<HTML> <HEAD> <SCRIPT src="JQuery-File-Path"> $(document).ready(){function(){ $("input").click(function(){ /* YOUR CODE */ }); }); </SCRIPT> </HEAD> </HTML>
The above code bind an INPUT element with click event. When any input element is clicked, the code in the function of input click event will be called. The ready event is triggered before the loading of all elements. And after the ready event triggers, the click event is allocated it’s work.
- And friends, you can do a lot of cool and fun stuff with JQuery. You can animate the elements, change the css of any elements quickly, do more things in just a few simple code chunks. There are so many methods to do animate like cool stuff: .slideUp(), .slideDown(), .fadeIn(), .fadeOut, .animate() and lot more. Catch all latest weapons of JQuery @ api.Jquery.com. And to find some great examples and more stuff on JQuery, go to : docs.jquery.com.