Commit 5bfa8f1a by Tom Giannattasio

fixed collapsible after check bug

parent c8d7fd78
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
$('.longform').hide(); $('.longform').hide();
$('.shortform').append('<a href="#" class="full">See full output</a>'); $('.shortform').append('<a href="#" class="full">See full output</a>');
$('.collapsible section').hide();
$('.full').click(function() { $('.full').click(function() {
$(this).parent().siblings().slideToggle(); $(this).parent().siblings().slideToggle();
$(this).parent().parent().toggleClass('open'); $(this).parent().parent().toggleClass('open');
...@@ -50,6 +52,7 @@ ...@@ -50,6 +52,7 @@
}); });
function toggleHint(e) { function toggleHint(e) {
e.preventDefault();
$(this).parent().siblings().slideToggle(); $(this).parent().siblings().slideToggle();
$(this).parent().parent().toggleClass('open'); $(this).parent().parent().toggleClass('open');
return false; return false;
...@@ -57,8 +60,7 @@ ...@@ -57,8 +60,7 @@
if(!collapsibleSet) { if(!collapsibleSet) {
collapsibleSet = true; collapsibleSet = true;
$('.collapsible section').hide(); $('body').delegate('.collapsible header a', 'click', toggleHint);
$('.collapsible header a').bind('click', toggleHint);
} }
}); });
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment