+ 2
Why jquery when JS and CSS are there
I mean there is already Javascript and CSS so why do we waste our time to learn jquery when it does the same thing
6 Respuestas
+ 11
That is because jQuery allows simplier/smaller codes. Sometimes javascript requires many lines of code to accomplish a task, but jQuery can just finish up the work with a single line of code.
If you worked with jQuery and Javascript/CSS before, etc. You may have noticed that jQuery pages loads faster , this is because jQuery's code helps to lighten work on CSS base codes(unless you are not using jquery to help CSS )
If you completed the lessons, you may notice that jQuery can give users the option of loading div-tags only when they need them. Preventing unnecessary loadings which hinders/slows down
your page's loading speed.
Also, even if Adobe flash is disabled(or adobe flash isn't installed), jQuery's element will still display and run on the browser without demands. How good is that?
Finally, the library is free, and it works ANYWHERE, you can use it on any platform/browser and the code will run/work.(Somehow like Java/Lua)
+ 5
Essentially to simplify cross-browsers support...
In my opinion, it's the only reason. However, all people don't have my tastes and my way of seeing what is more simple than what, and I can understand some people like the JQuery syntax, but when already known the JS/CSS syntax, it's again a new one to learn/retain...
@Wen Qin:
"Also, even if JavaScript is disabled(or adobe flash isn't installed), jQuery will still run on the browser without demands."
Oo You've got magical computer then!
Absolutly not: JQuery is a javascript library, so, if JS is disabled, JQuery doesn't run ^^
+ 4
Hang on. :D
Pages with jQuery will *not* load faster! Remember that you are loading some 80KB worth of Javascript into the browser by loading the jQuery library. jQuery isn't known to be blazingly fast anyway, you can almost always come up with a faster non-jQuery solution to any given problem.
jQuery also won't work with Javascript disabled, because jQuery is written in Javascript.
jQuery aims to make "day-to-day" coding stuff easier, like DOM manipulation, animating things, or handling events. Since jQuery came out, a lot of it's features have been added to Javascript in one way or the other so you can do well without it these days, but jQuery is still a useful tool, especially if your project also targets older browsers.
+ 3
Sry @Flonk @visph I made a mistake, it's when Adobe flash is not installed/disabled, jquery's elements display will still work. Not JS.
But jquery do load pages faster by lightening up CSS base codes.
+ 1
Nowadays most of the clients demands developers a short time deadline in making projects that's why you need to make it in short possible time. One of the best solution to that is using frameworks like JQuery. Frameworks makes your codings easier, faster and lighter. Many web developers now is using it.
0
To put it simply: Speed.
jQuery is faster to write and it takes away the need to maintain the compatibility across browsers. Regular JS likes to break depending on the end users setup. With jQuery you don't have to care about it because people behind jQuery do that for you.