好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

jquery lastest

最近,jQuery发布了最新版本jQuery 3.6.0。这个版本修复了一些缺陷,同时也添加了一些新特性。

$('p').on('click', function() {
$(this).hide();
});

一个重要的改进是对Node.js的支持。现在jQuery在Node.js中可以被直接引入,无需使用Browserify或Webpack等工具。

const $ = require('jquery');
$('body').addClass('dark-mode');

另外,jQuery 3.6.0还增强了对XML文档的支持,并提供了一个新的$.parseXML()函数。

const xmlText = '  First item  Second item  ';
const xmlDoc = $.parseXML(xmlText);
console.log(xmlDoc);

jQuery 3.6.0也有一些新的函数和改进。例如,$.ajax()函数现在支持fetch的AbortController。

const controller = new AbortController();
const signal = controller.signal;
$.ajax({
url: '/api/data',
method: 'GET',
signal: signal
}).done(function(response) {
console.log(response);
}).fail(function() {
console.log('Request aborted');
controller.abort();
});

总的来说,jQuery 3.6.0是一个非常优秀的版本,为开发者提供了更好的工具和体验。

查看更多关于jquery lastest的详细内容...

  阅读:16次

上一篇: jquery jtopo

下一篇:jquery js设置宽度