'Toggle an element: How to set HIDE as defualt?
I am really a beginner. Yet, I managed to toggle an element by adding a button
`<button class="togglebtn et_pb_button et_pb_button_2 et_pb_bg_layout_dark">ButtonText</button>
` plus
`<script>
jQuery(document).ready(function($) {
$ (".togglebtn").click(function () {
$(".toggle-element").toggle(400);
});
}); `
Per default, the specific element is displayed by default, but I want it hidden. What do I need to add (and where)? Thanks a lot.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
