how do i make a toggle content script start open?

  • 1
  • Question
  • Updated 9 years ago
  • Answered
title says it all
Photo of Alex

Alex

  • 3448 Posts
  • 39 Reply Likes
  • happy

Posted 9 years ago

  • 1
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hey Alex

You should be able to do this by changing one of the elements in the code to "show". Can you please post the page URL where you have this code?
Photo of Alex

Alex

  • 3448 Posts
  • 39 Reply Likes
http://yolacodes.yolasite.com/expandc...

i have made it bigger but thats all
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
In your code, locate this code:

<div class="expands" onclick="showHideMe('div1')">Expand 1</div>
<div id="div1" style="display:none;border:1px solid #55AA55;background-color:#AFA;width:100px">
Element One
</div>

Where it says "display:none:", change "none" to "show".

You will need to do this for each element you add.

Let me know if you have any trouble with this.
Photo of Alex

Alex

  • 3448 Posts
  • 39 Reply Likes
thanks :)
Photo of Alex

Alex

  • 3448 Posts
  • 39 Reply Likes
THANKYOU THANK YOU THANK YOU!!

errm

sanja
formerly littleus,

am i right?
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
You're very welcome! Yep.. that's me.. Littleus!
Photo of Alex

Alex

  • 3448 Posts
  • 39 Reply Likes
:) thanks