Posts by Lucas Vilas Boas • 11 points
5 posts
-
0
votes2
answers21
viewsA: How to use a class selector instead of the id "clock" for the counter to work in multiple instances (Divs)?
// Output the result in an element with id="demo" document.querySelectorAll(".clock").forEach(function(clock, index) { clock.innerHTML = days + " :" + hours + " :" +…
-
0
votes2
answers21
viewsQ: How to use a class selector instead of the id "clock" for the counter to work in multiple instances (Divs)?
getElementsByClassName() did not work. document.addEventListener('DOMContentLoaded', timerOffer); function timerOffer() { // Set the date we're counting down to var countDownDate = new Date("12 31,…
-
0
votes1
answer23
viewsA: Jquery: function search if file name contains and replace
That is the solution. $('.none img[src*="exemplo"]').attr('src', 'novo/caminho/imagem.png'); <li class"none"> <img src="/img/aqui-pode-mudar-exemplo.png?v=123456" alt="Imagem">…
jqueryanswered Lucas Vilas Boas 11 -
-2
votes1
answer23
viewsQ: Jquery: function search if file name contains and replace
Function to replace src if it contains a word. Ex: <li class"none"> <img src="/img/aqui-pode-mudar-exemplo.png?v=123456" alt="Imagem"> </li> Function to search in the "None"…
jqueryasked Lucas Vilas Boas 11 -
-1
votes1
answer35
viewsQ: If as function
How to define an "IF" run according to text of a "var"? Ex: var Ativar = { ativo: 'sim' }; I intend to use the "yes" for "IF" to validate and execute. Does anyone know how to? Pardon my explanation.…