javascript - How do I show an element when another element has already been clicked? -
i have link,
<a href="manager_view.html"> <p class="in_row">jane doe</p> </a>
i want show checkmark, ✓, when jane doe has been clicked in past. how that?
javascript
document.getelementsbyclassname('in_row')[0].onclick = function() { this.classname = 'in_row clicked'; }
or, if have more one:
var rows = document.getelementsbyclassname('in_row'); (var = 0, len = rows.length; < len; i++) { rows[i].onclick = doclick; //this function above code }
css
.clicked:before { content:"✓"; }
Comments
Post a Comment