i have the very first toggle code below, its very simple, but I may need up to 15 of these, so rather than duplicating the script to cover each new button and div, is there a way to use just one click function with maybe .this
<script>
$(document).ready(function(){
$("button").click(function(){
$("#invoicing").toggle();
});
});
</script>
<button>Invoicing Office</button>
<div id="invoicing">This is a paragraph.</div>
I forgot to add that when the page loads all the div’s need to be open, so the first toggle is too close each one up as necessary.
Could I ask one more question with this, at the moment, they divs are open on load, what changes can I make to your code below to make it so the divs are closed on load, and then toggle to open when clicked.