我对网络开发还不熟悉,而且j*的东西太多了.我想知道这些框架之间的区别是什么?

此外,为什么人们经常谈论使用jQuery制作插件?它不应该是一个JavaScript库,让你的网页更具交互性吗?

推荐答案

jQuery是一个JavaScript框架,旨在让开发人员真正做到"少写、多做",即你所问的3种不同风格,做非常不同的事情.

First up jQuery is the core library which contains the main functionality of the framework, so if you want to make an element fade in, you would include jQuery on your page, and then call the fadeIn() function on one of your elements.

jQuery UI was created with user-interface elements and interactions in mind that generally require a lot of code to manipulate otherwise. So the library contains things like the ability to drag and drop elements, and get useful information from those interactions. But at the same time there is a focus on the look and feel, therefore there are all sorts of themes available to style these powerful UI elements in this library.

jQuery mobile is a powerful framework built on top of jQuery and designed specifically for mobile platforms - after all the functionality of things like drag and drop needs to be rethought for touch screens, as does core functionality such as "hovering" which simply doesn't exist on mobile.

总之,这些框架可以用来提高网站的可用性,并真正节省开发人员大量时间.要了解更多关于框架的信息,请访问Learning jQuery——这是一个很好的入门资源.

Plugins allow web developers to take the solution to their problem and abstract it into a single functional and independent block (usually in a separate file). They can then share that with everyone else so that they can do the same. So if someone builds a gallery feature for a site they made, making a plugin would allow them to easily reuse the code, and help others facing the same problem.

Jquery相关问答推荐

如何用 jQuery / AJAX 替换表格的行

JQuery AJAX 成功事件未触发

缺少 .map 资源?

如何确定 jQuery 中匹配元素的元素类型?

如何用 javascript/jquery 替换 url 参数?

如何使用 AJAX 和 jQuery 发布 django 表单

可以在不使用for=id的情况下将标签与复选框相关联吗?

在 jquery 中启用/禁用下拉框

使用带有 HTML 表格的 jQuery UI 可排序

在不丢失光标位置的情况下更新输入值

隐藏 div 但保留空白

JQuery - 如何根据值 Select 下拉项

如何让 JavaScript/jQuery Intellisense 在 Visual Studio 2008 中工作?

从 Select 元素中获取选定的选项

如何从所有元素jquery中删除类

如何使用jQuery触发类更改事件?

我可以通过 JavaScript 禁用 CSS :hover 效果吗?

CORS - 如何预检httprequest?

IE 中带有 jQ​​uery ajax 调用的无传输错误

如何在 jQuery 中取消绑定悬停?