0
I am developing a web application and would like to take the edge to the page loading, but it presents following error.
Uncaught TypeError: Cannot set property 'border' of undefined
JS
<script>
$(document).ready(function(){
document.getElementsByClassName("linha").style.border= "0 none";
});
</script>
CSS
.linha {
border: 1px solid #E0E0DA;
height: 390px;
}
HTML
<div class="linha">
<img src="imagens/camisa_1.JPG" alt="camisa1" class="imagem_teste">
<p class="descricao_produto">Calça Jeans Armani</p>
<h4 class="preco"> A partir de R$134,99</h4>
<button class="saiba_mais" id="saiba_mais1">SAIBA MAIS</button>
</div>
has also the
querySelector()
– NoobSaibot
@Correct Description was another valid alternative, which has even tended to be more scalable and easy to maintain, as it can have any selector other than just class.
– Isac