1var clicked = false;
2
3function toggleBtnClick() {
4 var img = document.getElementById('baseImg');
5 if (clicked) {
6 img.src = 'http://via.placeholder.com/350x150/e9e9e9/000000';
7 clicked = false;
8 } else {
9 img.src = 'http://via.placeholder.com/350x150/3fafed/000000';
10 clicked = true;
11 }
12}