There are some issues with this snippet of jQuery. First, it is manipulating CSS directly, rather than manipulating classes and leaving the CSS in stylesheets. What else in this code is best to avoid?js$('.item').css('background-color', 'red');// some other code herevar firstSubItem = $('.item').find('.sub-item').get(0);// some other code here too$('.item').parents('.navigation').css('font-weight', 'bold');

🎲 Try a Random Question  |  Total Questions in Quiz: 75  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
jQuery Quiz — practice the complete quiz, review flashcards, or try a random question.

jQuery MCQs For LinkedIn Skill Assessments.


There are some issues with this snippet of jQuery. First, it is manipulating CSS directly, rather than manipulating classes and leaving the CSS in stylesheets. What else in this code is best to avoid?<br>js<br>$('.item').css('background-color', 'red');<br>// some other code here<br>var firstSubItem = $('.item').find('.sub-item').get(0);<br>// some other code here too<br>$('.item').parents('.navigation').css('font-weight', 'bold');<br>