I am trying to change the CSS of one element on click of another element. I\'ve searched a lot but nothing works perfectly. Currently I am using the below code, but it doesn
In your code you aren't using jquery, so, if you want to use it, yo need something like...
$('#foo').css({'background-color' : 'red', 'color' : 'white', 'font-size' : '44px'});
http://api.jquery.com/css/
Other way, if you are not using jquery, you need to do ...
document.getElementById('foo').style = 'background-color: red; color: white; font-size: 44px';