用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill jquery命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | jquery |
| description | jQuery — legacy, server-rendered, WordPress, pre-framework codebases. |
jquery in package.json OR <script src="...jquery..."> in HTML$ or jQuery function calls in .js files.ready(), $(document).on(), $(window) patterns.select2(), .dataTable(), .slick(), .datepicker()$.ajax(), $.get(), $.post() callsNo official MCP server is available for jQuery.
Reference the jQuery API at api.jquery.com. A documentation search MCP (if configured) can retrieve specific API pages on demand.
jQuery exists in this project for a reason — legacy, WordPress constraints, plugin ecosystem, or team familiarity. Do not refactor jQuery to vanilla JS or a framework unless explicitly tasked. Integrate with the existing pattern; flag modernization opportunities in code review notes only.
| Concept | Detail |
|---|---|
$(selector) | Returns jQuery object wrapping matched elements; methods chain on it |
| DOM ready | $(function() { ... }) — safe to access DOM after parsing |
| Event delegation | .on('event', '.child', fn) — works on dynamically added elements |
| AJAX | $.ajax(), $.get(), $.post() — callback or Promise (.done(), .fail(), .always()) |
| Plugins | Extend $.fn — called as $('.el').pluginName(options) |
| Chaining | Most methods return the jQuery object — enables $el.hide().delay(200).fadeIn() |
// DOM ready
$(function () {
// safe to access DOM here
})
// Event delegation — preferred; works on dynamic content
$(document).on('click', '.btn-submit', function () {
const $form = $(this).closest('form')
$form.find('.error').hide()
})
// Cache selectors — never re-query inside loops
const $modal = $('#confirmModal')
$modal.find('.modal-title').text('Are you sure?')
$modal.modal('show')
// AJAX with Promise style
$.get('/api/users')
.done(function (data) { renderUsers(data) })
.fail(function (xhr) { showError(xhr.responseJSON?.message) })
// Plugin initialization pattern
$('.select-field').select2({
placeholder: 'Choose an option',
allowClear: true,
})
When jQuery coexists with Vue, React, or Alpine:
$.trigger() / $(document).on()) to bridge jQuery and framework code if needed$() results — const $el = $('#id') once; never re-query the same selector repeatedly, especially inside loops.on() not .click(), .submit(), .hover() — shorthand aliases are deprecated$(this) in handlers — cache as const $self = $(this) if used more than once in the same handler$.get() on unvalidated user-supplied URLs — always whitelist or validate URLs before AJAX to prevent SSRF.select2() twice initializes twice; always destroy before re-init if reconfiguring