I use this snippet to remember the state of a toggle. But i want the default state to be hidden. How can i accomplish this? I added "display:none;" to .toggle_container but this isn't working.
- $ ( ".toggle_container" ). each ( function () {
$
( this ). toggle ( $ . cookie ( 'show-' + this . id ) != 'collapsed' );
});
$
( ".trigger" ). click ( function () {
var tc = $ ( this ). toggleClass ( "active" ). next ( ".toggle_container" ). slideToggle ( "slow" , function () {
$
. cookie ( 'show-' + $ ( this ). attr ( "id" ), $ ( this ). is ( ":hidden" ) ? 'collapsed' : 'expanded' );
});
return false ;
});