{"name":"Toggle with icon","key":"icontoggle","version":"1.0.2","instructions":"Enter content to toggle in between the tags in the page\n","showatto":"1","showplayers":"0","requirecss":"","requirejs":"","shim":"","defaults":"closedtext=\"Show\",opentext=\"Hide\"","amd":"1","body":"<div id=\"@@AUTOID@@\"><span class=\"fa fa-2x fa-toggle-off togglebutton\"  aria-hidden=\"true\"></span><span class=\"toggletext\" style=\"padding: 5px;\">@@closedtext@@</span></div>\n\t<div id=\"@@AUTOID@@_target\" class=\"@@AUTOID@@_target\" style=\"display: none;\">","bodyend":"</div>","script":"var state=0;\n$(\"#\"  + @@AUTOID@@).click(function(e){\n$(\"#\" + @@AUTOID@@ + \"_target\").toggle(\n{duration: 300, complete: doToggleState}\n); \nreturn false;\n});\n\nvar doToggleState=function(){\nvar tb = $(\"#\"  + @@AUTOID@@ + ' .togglebutton');\nif(state==0){\ntb.removeClass('fa-toggle-off');\ntb.addClass('fa-toggle-on');\n $(\"#\"  + @@AUTOID@@ + ' .toggletext').text(@@opentext@@);\nstate=1;\n}else{\ntb.removeClass('fa-toggle-on');\ntb.addClass('fa-toggle-off');\n $(\"#\"  + @@AUTOID@@ + ' .toggletext').text(@@closedtext@@);\nstate=0;\n}\n};","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":""}