login  Naam:   Wachtwoord: 
Registreer je!
 Forum

standaard uitgerekte pagina weergeven

Offline Gust - 03/09/2008 16:01 (laatste wijziging 03/09/2008 16:04)
Avatar van GustMySQL interesse Ik heb een pagina waarvan je de delen afzonderlijk kunt uitrekken. Maar als je voor de eerste keer op die pagina komt is alles nog verborgen.

Hoe kun je ervoor zorgen dat dat eerste deel standaard uitgerekt is?

Klik hier om het te zien


Dit is de code:
  1. .handcursor{
  2. cursor:hand;
  3. cursor:pointer;
  4. font-family: verdana;
  5. font-size: 11px;
  6. color: #CA0005;
  7. hover: #CA0005;
  8. visited: #CA0005;
  9. active: #CA0005;
  10. text-decoration: none;
  11. }
  12.  
  13. .handcursor2{
  14. cursor:hand;
  15. cursor:pointer;
  16. font-family: verdana;
  17. font-size: 11px;
  18. color: #CA0005;
  19. hover: #CA0005;
  20. visited: #CA0005;
  21. active: #CA0005;
  22. text-decoration: none;
  23. }


  1. <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  2. <tr>
  3. <td width="25%" height="30" bgcolor="#CAE4FF">
  4. <div align="center" class="handcursor" id="bobcontent1-title"><b><font color="#CA0005">SUPPLIER INFORMATION</font></b></div></td>
  5. <td width="25%" height="30" bgcolor="FFE6CC">
  6. <div align="center" class="style9" id="bobcontent2-title"><b><font color="#CA0005">GENERAL FACILITIES</font></b></div></td>
  7.  
  8. <td width="25%" height="30" bgcolor="FFFF99">
  9. <div align="center" class="style10" id="bobcontent3-title"><b><font color="#CA0005">PAYMENTS &amp; RESERVATION</font></b></div></td>
  10.  
  11. <td width="25%" bgcolor="#FFD86F"><div>
  12. <div align="center" class="style11" id="bobcontent4-title"><b><font color="#CA0005">ACCOMMODATION MANAGER</font></b></div></td>
  13. </tr>
  14.  
  15. <div id="bobcontent1" class="switchgroup1">
  16. <table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bordercolor="#0054A8">
  17. <tr>
  18. <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
  19. <tr>
  20.  
  21. <div id="bobcontent2" class="switchgroup1">
  22. <table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bordercolor="#0054A8">
  23. <tr>
  24. <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
  25. <tr>
  26.  
  27. <div id="bobcontent3" class="switchgroup1">
  28. <table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bordercolor="#0054A8">
  29. <tr>
  30. <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
  31. <tr>
  32.  
  33. <div id="bobcontent4" class="switchgroup1">
  34. <table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bordercolor="#0054A8">
  35. <tr>
  36. <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
  37. <tr>


  1. // MAIN FUNCTION: new switchcontent("class name", "[optional_element_type_to_scan_for]") REQUIRED
  2. // Call Instance.init() at the very end. REQUIRED
  3.  
  4. var bobexample=new switchcontent("switchgroup1", "div") //Limit scanning of switch contents to just "div" elements
  5. bobexample.setStatus('<img src="images/minus.gif" /> ', '<img src="images/plus.gif" /> ')
  6. bobexample.setColor('darkred', 'black')
  7. bobexample.setPersist(true)
  8. bobexample.collapsePrevious(true) //Only one content open at any given time
  9. bobexample.init()

  1. var joeexample=new switchcontent("switchgroup2", "p") //Limit scanning of switch contents to just "p" elements
  2. joeexample.setStatus('[open] ', '[closed] ')
  3. joeexample.setColor('green', 'red')
  4. joeexample.collapsePrevious(false) //Allow more than 1 content to be open simultanously
  5. joeexample.setPersist(false)
  6. joeexample.defaultExpanded(0,1)
  7. joeexample.setContent(0, 'whatisjavascript.htm') //specify remote content for 1st header's content
  8. joeexample.setContent(1, 'whatisjava.htm') //specify remote content for 2nd header's content
  9. joeexample.init()

2 antwoorden

Gesponsorde links
Offline Ontani - 04/09/2008 09:20 (laatste wijziging 04/09/2008 09:25)
Avatar van Ontani Gouden medailleGouden medailleGouden medailleGouden medaille

-1
bij bobexample:

  1. bobexample.defaultExpanded(0)
Offline Gust - 04/09/2008 13:08
Avatar van Gust MySQL interesse Dat dacht ik ook eerst. Maar dat heeft er geen invloed op, zoals bij 0 als bij 1 
Gesponsorde links
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.273s