Change CSS properties on click
Firstly, using on* attributes to add event handlers is a very outdated way of achieving what you want. As you’ve tagged your question with jQuery, here’s a jQuery implementation: <div id=”foo”>hello world!</div> <img src=”zoom.png” id=”image” /> $(‘#image’).click(function() { $(‘#foo’).css({ ‘background-color’: ‘red’, ‘color’: ‘white’, ‘font-size’: ’44px’ }); }); A more efficient method is to put those … Read more