CSS
- 5 ответов
- 0 вопросов
5
Вклад в тег
$('.views-field-field-jtc-top .field-content').each(function() {
var $this = $(this),
_index = parseInt($this.val()) - 1,
_classes = ['first-rating', 'second-rating', 'third-rating'];
//console.log (_classes[_index]);
if (_classes[_index]) {
$this.addClass(_classes[_index]);
} else {
$this.addClass('other-rating');
}
});