Tagged: yigit
Hi,
This one is for Yigit if possible.
Yigit gave me this code for toggle inside a table – and it works great:
————————————————————————————
function add_custom_cs(){
?>
<script>
jQuery(window).load(function(){
jQuery( “.coursetitle” ).click(function() {
jQuery(this).closest(“td”).find(“.courseinfo”).toggle();
});
});
</script>
<?php
}
add_action(‘wp_footer’, ‘add_custom_cs’);
———————————————————————————
What shoud I add to make the toggle box close when I click outside it or click on another line – now they close only if I click on the one that I opened.