Код: Выделить всё
{ 0: DOMElement1, 1: DOMElement2, 2: DOMElement3, ...}Код: Выделить всё
{ 0: {0: DOMElement1, num: 1}, 1: {1: DOMElement2, num: 2}, 2: {2: DOMElement3, num: 3}}Код: Выделить всё
(function($) {
var orig = $.fn.constructor;
$.fn.constructor = function(e) {
var origApplied = orig.apply(this, arguments);
console.log("Constructor called");
var outputData = $.map( origAppliedArray, function (value, index) { return {[index]: value, num: index} });
return outputData;
}
})(jQuery)
Как я мог достичь указанного результата?
Подробнее здесь: https://stackoverflow.com/questions/787 ... lements-to
Мобильная версия