Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I organize the jQuery code style to avoid confusion by so many brackets and so many nests? Any good sample?

I got easily confused by jQuery's coding style. So many brackets, incline functions and nests in nests. How can I change my coding style to improve this? Any great examples to show this??

like image 449
lkahtz Avatar asked Dec 25 '10 08:12

lkahtz


2 Answers

Check out the excellent jQuery coding standards series here:

  • jQuery Coding Standards
like image 166
Sarfraz Avatar answered Oct 23 '22 22:10

Sarfraz


CoffeeScript is a little language that compiles into JavaScript. Underneath all of those embarrassing braces and semicolons, JavaScript has always had a gorgeous object model at its heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.

I haven't try it out yet , but I think it is a good way ....

like image 2
wizztjh Avatar answered Oct 23 '22 22:10

wizztjh