V
V
Vova Budnyak2018-03-12 20:20:27
css
Vova Budnyak, 2018-03-12 20:20:27

Why doesn't the color change on click?

https://jsfiddle.net/puckk4bv/13/

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vadim, 2018-03-12
@ShVad

$(document).ready(function(){
//
});

T
twobomb, 2018-03-12
@twobomb

On onload and syntax. On the JSFiddle where you choose the library, set Load Type : OnLoad

$('.but1').click(function(){
  $('.first').css({"background-color": 'yellow'});
  $('.second').css({"background-color": 'green'});
});

Although if one property is already possible

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question