Here, I got this working properly.
I gave 2 id
to related divs
<div class="onoffswitch right fields_toggle" id="btn_for_toggle">
and
<div class="row toggle_container" id="form_elements">
and in javascript part:
jQuery("#myonoffswitch2").on("click", function () {
jQuery("#form_elements").toggle("slow");
jQuery("#btn_for_toggle").toggleClass("closed");
});
See my fiddle