Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
</style>
</head>
<body>
  <div class="CheckButton two">
                            <label><input type="checkbox" />Getting to Grips With Governance (The Wheel)</label>                        
                        </div><!--checkButton-->
                        <div class="TextareaAccordion two">
                            <p><span class="helptext">Where you are fully compliant no further comment is necessary. Where you are not yet fully compliant please provide more information.</span></p>
                            <textarea name="" cols="10" rows="3" id="explanatorytext"></textarea>
                        </div>
                        <div class="CheckButton three">
                            <label><input type="checkbox" />Reducing the Risk (The Wheel)</label>                       
                        </div><!--checkButton-->
                        <div class="TextareaAccordion three">
                            <p><span class="helptext">Where you are fully compliant no further comment is necessary. Where you are not yet fully compliant please provide more information.</span></p>
                            <textarea name="" cols="10" rows="3" id="explanatorytext"></textarea>
                        </div>
</body>
</html>
 
$(document).ready(function() {
                        //ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING)
                        $('.CheckButton').click(function() {
                        if($(this).next().is(':hidden') == true) {
                          //ADD THE ON CLASS TO THE BUTTON
                          $(this).addClass('on');
                          $(this).find("input:checkbox").attr("checked",true);
                          //OPEN THE SLIDE
                          $(this).next().slideDown('normal');
                          return false;
                        } else {
                          //ADD THE ON CLASS TO THE BUTTON
                          $(this).removeClass('on');
                          $(this).find("input:checkbox").attr("checked",false);
                          //OPEN THE SLIDE
                          $(this).next().slideUp('normal');
                          return false;
                        }
                    });
                    /**CLOSES ALL S ON PAGE LOAD**/
                    $('.TextareaAccordion').hide();
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers