Variables are a great way to store types of information, especially when writing JavaScript. Using variables when writing jQuery is no diff erent than using them with JavaScript. You can set variables and call them within the jQuery wrapper because it's all basically just JavaScript. The beauty of jQuery is that it is JavaScript, so if you have any prior knowledge of JavaScript, you can directly apply that knowledge to jQuery. You don't have to worry about learning new syntax, conventions, or methods because most of jQuery is based on JavaScript functionality, but the syntax is much easier to understand.
You may be wondering, if jQuery is JavaScript, why not just learn JavaScript? The answer is that jQuery takes everything that JavaScript does and makes it much easier to implement. The jQuery tagline — "Write less, do more" — definitely holds true. You can take 20 lines of native JavaScript and turn it into 5 lines of jQuery without having to know JavaScript. For those of you who are curious about JavaScript, learning jQuery can help you to understand the JavaScript API.
JavaScript can be hard to understand. jQuery makes it much easier for Web designers to implement features from the JavaScript API without having to understand all the complexities of JavaScript itself. jQuery has really opened up the door for so many Web designers who previously had little programming experience to add interactivity to their Web sites. It's a great time to be working with jQuery: The support and community around this library is growing at an astounding rate.
0 comments:
Post a Comment