简体   繁体   English

作为一名精通HTML和CSS的设计师,开始使用jquery插件而不是学习javascript是否安全? 我不是程序员

[英]As a designer who has become proficient in HTML and CSS, is it safe to start using jquery plugins instead of learning javascript? I'm not a programmer

I have mastered for the most part taking my designs and coding them as read only web pages. 我大部分都掌握了我的设计并将它们编码为只读网页。 I'm looking to go the next level. 我想进入下一个级别。 I have used some jquery plugin's and figured them out quite easily with a bit of trial and error. 我已经使用了一些jquery插件,并通过一些试验和错误很容易找到它们。 I have also started reading a book on Java script but it seems like nothing I'll ever really need as I don't plan on REALLY ever writing my own code. 我也开始阅读一本关于Java脚本的书,但似乎没有什么我真正需要的,因为我没有计划真正编写我自己的代码。 I don't think I will at least any time soon. 我认为我至少不会很快。 Is it safe for me to just learn a plethora of jquery plugin uses for now or should i really be trying to learn java script to write my own code. 我现在学习大量的jquery插件是否安全,或者我真的应该学习java脚本来编写我自己的代码。 I bought the book "Headfirst Javascript" but it is a lot of basics where jquery plugins give me results fast i can use! 我买了这本书“Headfirst Javascript”,但它是很多基础知识,jquery插件给我快速的结果,我可以使用! Any advice? 有什么建议?

jQuery is like any abstraction: you can use it without understanding what it's doing under the hood but don't be surprised if you run into problems from that lack of understanding. jQuery就像任何抽象:你可以使用它而不了解它在幕后做的事情,但如果你因缺乏理解而遇到问题也不要感到惊讶。 Also, you can't do just jQuery without doing any Javascript whatsoever. 此外,如果不做任何Javascript,你不能只做jQuery。 For example: 例如:

  • Redirecting the user; 重定向用户;
  • Reloading the page; 重新加载页面;
  • The contextual meaning of 'this'. 'this'的语境含义。

These are all important and common things in the jQuery world but are "pure" Javascript. 这些都是jQuery世界中重要而常见的东西,但却是“纯粹的”Javascript。

So all in all I'd recommend having at least a rudimentary knowledge of the DOM and Javascript syntax and functionality before doing jQuery. 总而言之,我建议在做jQuery之前至少掌握DOM和Javascript语法和功能的基本知识。

Learn JavaScript. 学习JavaScript。 Learn the DOM. 学习DOM。

jQuery is nice, but if you don't know JavaScript and the DOM, it isn't going to help. jQuery很不错,但是如果你不了解JavaScript和DOM,它就无济于事。

$(function() { /* JavaScript goes here */ });

jQuery does three things well: it enables developers to use CSS selectors to manipulate the DOM, it smooths the rough edges of cross-browser programming, and it offers a plethora of wonderful plugins. jQuery做了三件事:它使开发人员能够使用CSS选择器来操作DOM,它可以平滑跨浏览器编程的粗糙边缘,并且它提供了大量精彩的插件。

I recommend Douglas Crockford's "JavaScript: The Good Parts." 我推荐Douglas Crockford的“JavaScript:The Good Parts”。 It's full of good advice on how to write good JavaScript, and it has an insightful road map for avoiding the gotchas and pitfalls of bad JavaScript. 它对如何编写优秀的JavaScript提供了很好的建议,并且它有一个深刻的路线图,可以避免错误的JavaScript陷阱和陷阱。 Perhaps most importantly, it's short enough that you can read and digest in a few days (or hours if you're a fast reader). 也许最重要的是,它足够短,你可以在几天内阅读和消化(如果你是一个快速读者,你可以阅读和消化)。

I started with jquery and then bought some books on classic javascript (like the one of john resig, the jquery programmer !) 我从jquery开始,然后买了一些关于经典javascript的书籍(比如john resig,jquery程序员!)

I thought javascript was hard to learn and with jquery you'll learn what can be done with javascript ! 我认为javascript很难学习,而jquery你将学习使用javascript可以做些什么! Then with books you'll understand the internals of jquery. 然后通过书籍,您将了解jquery的内部结构。 good luck 祝好运

Also if you have to choose between prototype and jquery, choose jquery, i used prototype for 4 months and didn't learned any javascript specific function. 此外,如果您必须在原型和jquery之间进行选择,请选择jquery,我使用原型4个月并且没有学习任何特定于JavaScript的功能。

Then with only 1 week of javascript, i knew what setTimeout was used for 然后只用了1周的javascript,我知道setTimeout用于什么

Just an example to show that jquery will help you learn javascript from time to time 举个例子来说明jquery会不时帮助你学习javascript

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

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