Jump to content

  • Free consultations and support
  • Live chatClick Here for Live Chat
  • Call ico 1888-906-1888
    Phone support: Open

    Ready for your call :)

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams

    Phone support: Closed

    We are back in: 1h 20m

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams


JavaScrips Tips

javascrips tips

  • Please log in to reply
 

#1 SmartWeb

SmartWeb

    Senior Member

  • Designer
  • 271 posts

Posted 18 June 2013 - 04:09 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users