1. Don’t repeat code
Use cascade and avoid code repetition. Make use of the heritance, and use the same properties set for multiple elements.
2. Use ID’s whenever possible
IDs are fast. You can use alternatives other than jQuery to select your tags, such as document.body .
3. Keep your selectors simple and short
If you don’t need it don’t use it.
4. avoid time consuming operations
Keep in mind that every operation has a processing cost. So use native JavaScript code whenever it is possible. Try to avoid using jQuery and other plugins to save loading time.
JavaScrips Tips
1. Don’t repeat code
Use cascade and avoid code repetition. Make use of the heritance, and use...
javascrips tips
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users