M
M
Michael R.2015-10-09 13:30:46
JavaScript
Michael R., 2015-10-09 13:30:46

Why is the class not added in this version?

Hello! The task is to add a class to an already existing one in the layout, I wrote the following expression: , but when testing, the row-block class is not added to the div element with the stylereviews1 class, what am I doing wrong? And immediately another question, how to specify nesting to the desired class? For example, I need to specify that row-block is added exactly to the stylereviews1 that is inside the new class, maybe like this?: Thank you! $('.stylereviews1').addClass('row-block');
$('.new .stylereviews1').addClass('row-block');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
holfza, 2015-10-09
@Mike_Ro

$( document ).ready(function() {
    $('.new .stylereviews1').addClass('row-block');
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question