There are two <div> same class. On the page one above the other.
How to remove one of the (upper) ones with JS?
<div class="someclass">.....</div> <div id="1">.......</div> <div id="2">.....</div> <div class="someclass">.....</div> There are two <div> same class. On the page one above the other.
How to remove one of the (upper) ones with JS?
<div class="someclass">.....</div> <div id="1">.......</div> <div id="2">.....</div> <div class="someclass">.....</div> Try $ ('. Someclass: first'). Remove ();
document.getElementsByClassName('имякласса') ).remove() method on the first element of the array document.getElementsByClassName('someclass')[0].remove() <div class="someclass">someclass #1</div> <div id="1">обычный #1</div> <div id="2">обычный #2</div> <div class="someclass">someclass #2</div> Source: https://ru.stackoverflow.com/questions/771066/
All Articles