-
-
Save n4ru/f899e15ac977d662a321 to your computer and use it in GitHub Desktop.
Adding qty of value to list array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addCards: function (elemone, elemtwo, elemthree) { | |
var self = this; | |
$(elemone).each(function(i, el) { | |
var values = $(elemtwo, this).text(); | |
self.list.push(values); | |
i = 0; | |
console.log($(elemthree, this).text().replace(/(\d+)(?!.*\d)/g, $1)); | |
while (++i < parseInt($(elemthree, this).text())) { | |
self.list.push(values); | |
} | |
}); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment