简体   繁体   English

我可以通过基本的JavaScript体验学习如何使用jQuery吗?

[英]Can I learn how to use jQuery with just a basic JavaScript experience?

The question is: Is it bad to learn how to do special effects, table sorting, etc, using jQuery instead of learning the bits of code that bring that alive with pure javascript? 问题是:学习如何使用jQuery进行特效,表格排序等不是很难 ,而不是学习那些通过纯javascript带来活力的代码?

I have previously addressed a similar problem in a question , but I missed adding this extra inquiry! 我之前在一个问题中解决了类似的问题 ,但我错过了添加这个额外的查询!

Yes you can. 是的你可以。 Doing it in JQuery isn't bad. 在JQuery中做它也不错。 Everyone uses some sort of Javascript library. 每个人都使用某种Javascript库。 I love JQuery. 我喜欢JQuery。 Your odds of making things that work in all browsers go up quite a bit, you get the UI done quicker, etc. 制作适用于所有浏览器的东西的几率可能会提高很多,你可以更快地完成UI,等等。

Though having a bit of Javascript knowledge is good, because when things go wrong you want to be able to debug the problem. 虽然有一点Javascript知识是好的,因为当出现问题时,你希望能够调试问题。

JQuery.com has lots of good tutorials . JQuery.com有很多很好的教程

You really should use jQuery; 你真的应该使用jQuery; it will allow you to spend more time adding features instead of trying to make your code work in every browser (Note that even jQuery is not a silver bullet; you'll still have some cross-browser headaches in any non-trivial web app, especially if you need to support IE6). 它会让你花更多的时间来添加功能,而不是试图让你的代码在每个浏览器中工作(注意,即使jQuery也不是一个灵丹妙药;你仍然会在任何非平凡的web应用程序中遇到一些跨浏览器的头痛,特别是如果你需要支持IE6)。

There's no point in turning your back on new tools and libraries just to "stay close to the metal". 为了“保持接近金属”而拒绝新工具和库是没有意义的。

If you're afraid of lowering your value in your boss' eyes, look at it a different way. 如果你害怕降低你老板眼中的价值,那就以不同的方式看待它。 Would you prefer to hire a programmer who spends all of his time working around browser bugs, or a programmer who uses jQuery and finishes his projects faster because of it? 您是否愿意雇用一名程序员,他花费所有时间来处理浏览器错误,或者是一名使用jQuery的程序员并因此而更快完成项目? Remember that managers are trying to ship products and make money, not simply hire elite programmers. 请记住,经理们正在尝试运送产品并赚钱,而不是简单地聘请精英程序员。

Personally I was recommended to learn JS before learning jQuery. 我个人在学习jQuery之前建议学习JS。 But started off with jQuery, and can make pretty much with it without to much JS experience. 但是从jQuery开始,并且可以在没有太多JS经验的情况下完成它。 What you do need to know of JS you can just google it and learn it when needed ;) 你需要知道的JS你可以谷歌它并在需要时学习它;)

jQuery is fantastic for us that doesn't take the time to learn everything about JS jQuery对我们来说太棒了,不花时间学习JS的一切

Personally, until the beginning of this year, I used to limit my use of javascript to only helping aid the user with things like web forms. 就个人而言,直到今年年初,我过去常常限制我使用javascript来帮助用户使用网络表单之类的东西。

However, after playing around with jQuery for no more than a few days, I realised how much easier it made achieving javascript effects and functionality. 然而,在使用jQuery不超过几天后,我意识到它实现javascript效果和功能的容易程度。 Now I pretty much use jQuery on most web pages, a lot of the time, just to add nicer UI effects. 现在我在大多数网页上使用jQuery,很多时候,只是为了添加更好的UI效果。

A background knowledge of raw javascript will never go amiss and you will almost certainly still have to mix it in with your jQuery scripts, but when you run into troubles, nearly every problem I've had, had a solution already posted on Stack Overflow or just on Google. 原始javascript的背景知识永远不会出错,你几乎肯定还要把它与你的jQuery脚本混合在一起,但是当你遇到麻烦时,几乎我遇到的每一个问题,已经在Stack Overflow上发布了一个解决方案或就在Google上。

Not a very technical answer, but as an intermediate programmer, and javascript newbie I've had no problems learning to work with jQuery. 不是一个非常技术性的答案,但作为一个中级程序员,和javascript新手我学习使用jQuery没有任何问题。 The documentation and community are very helpful. 文档和社区非常有帮助。

I think you should set yourself a goal of knowing javascript well enough to be able to author a plugin if you need it in your favorite framework. 我认为你应该为自己设定一个目标,即能够很好地了解javascript,如果你需要在你最喜欢的框架中创建一个插件。 While using a framework is almost always the right way to go, there will be times when you can't find a plugin that does exactly what you need. 虽然使用框架几乎总是正确的方法,但有时您无法找到完全符合您需要的插件。 At that point you need to know javascript well enough to be able to adapt a plugin to your needs or write your own. 那时你需要知道javascript,以便能够根据你的需要调整插件或自己编写。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM