I have a div
that I wanted to animate when I click another div
. I know this can be done easily with jQuery, but somehow I could not get it work.
I have tried the SO suggestion here to add
$('#button').onClick(function(){
$('#target_element').addClass('.animate_class_name');});
but nothing happened.
This is the fiddle https://jsfiddle.net/rdfbcq3j/2/. The goal is to animate the red circle div object into a rectangle when click_me
is pushed. What is the best way to do it?