Am I using too much jQuery? When am I crossing the line?

后端 未结 8 2359
孤城傲影
孤城傲影 2020-11-27 06:46

Lately I found myself using jQuery and JavaScript a lot, often to do the same things that I did before using CSS.

For example, I alternate table rows color or create

8条回答
  •  Happy的楠姐
    2020-11-27 07:32

    jQuery most often gets applied after the document has been loaded. I guess that if you can achieve the same thing with plain CSS, CSS is the way to go. Less load on the browser, and if someone doesn't have jQuery enabled at least there's still (some) style because of the CSS.

提交回复
热议问题