Animate layer on click

You will have to give a Custom css class to the item, which is in that layer, to identify what you want to animate. In my example, I want to move the layer of a paragraph, so I will add paragraphmove as class name.
custom_css

After that go to your HTML widget, turn it on, and use that class, what you just gave to your item, to create your custom javascript and css code.
html_widget

This is the code I used:

<script>
njQuery(document).ready(function(){
      njQuery(".paragraphmove").parent("div").toggle(function(){
           njQuery(this).animate({'marginLeft':'-200px'},500);
      }, function() {
           njQuery(this).animate({'marginLeft':'0'},500);
      });
});
</script>

It will give -200px left margin to the layer of that item on the first click, and it changes back to the default 0 on the second click. You can read more about the animate function in here. Basically you can use any css code in there, just google after it’s name, if it doesn’t work, because as you see the margin-left property has to be written as marginLeft too.