Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <li><h3><a href="#" target="_blank" id="feature1" name="feature1">What do I know about javascript?</a></h3>
- <div class="check_list_wrap feature1">Not a lot, apparently.</div>
- </li>
- <script type="text/javascript">
- $(function() {
- $("#listfeatures h3 a").toggle(function(){
- $(this).addClass("check_list_selected");
- }, function () {
- $(this).removeClass("check_list_selected");
- });
- $("#listfeatures h3 a").click(function() {
- $("."+this.id).slideToggle('fast');
- return false;
- });
- });
- </script>
- $(document).ready(function() {
- if(location.hash) {
- var id = location.hash.slice(1); //Get rid of the # mark
- var elementToShow = $("#" + id); //Save local reference
- if(elementToShow.length) { //Check if the element exists
- elementToShow.slideToggle('fast'); //Show the element
- elementToShow.addClass("check_list_selected"); //Add class to element (the link)
- }
- }
- });
Add Comment
Please, Sign In to add comment