Change caption-side with JavaScript

Edit This Code :
Result :