Created
December 3, 2019 12:25
-
-
Save Pum-purum/92720e3dcec3a8956ae1d9d283991c5c to your computer and use it in GitHub Desktop.
foreach in JS
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
for (value of this.IDS) { | |
$('#' + value).barrating({ | |
theme: 'fontawesome-stars', | |
showSelectedRating: false, | |
initialRating: this, | |
onSelect: function (value, text, event){ | |
var obj = this.$elem[0]; | |
if (value == 5) { | |
var companyID = $(obj).data('companyid'); | |
_this.allCorrect(value, companyID) | |
} else { | |
var companyName = $(obj).data('name'); | |
_this.notAllCorrect(value, companyName, event); | |
} | |
}, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment