View Single Post
  #19  
Old 02-05-2010, 02:55 PM
voglermc's Avatar
voglermc voglermc is offline
 
Join Date: Oct 2006
Location: Piedmont Triad, NC, USA
Posts: 295
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm trying to collapse my header for smaller monitors and have a cookie set so it remembers the open or closed state like VB does in its collapse buttons. It doesn't seem to work. Can anyone help me get this so it remembers the cookie?

Code:
<div id="vb4_container">

    <div id="vb4" style="width:920px"><a id="vb4_link" href="http://www.domain.org/"></a>

        <div id="vb4_content">
        <p>Our club was started as a way for ...</p>
        <ul>        
        <li><a href="http://www.domain.org/register.php">Click Here to learn MORE!</a></li>
        </ul>
        </div>

    </div>

<a id="vb4_close" href="#" onclick="
var v_vob = fetch_object('vb4_container');
if(v_vob)
{
set_cookie('vb4banner_off', v_vob.className ? '' : 1);
v_vob.className = v_vob.className ? '' : 'promo_closed';
}
return false;
"></a>

</div>
CSS CODE
Code:
/* vB4 Promo */
#vb4_container {
 background-color:#2d2d2d;
 /*margin: 0 -35px 10px;*/
 margin: 0;
 padding:10px 0 0 0;
 position:relative;
}

#vb4 {
 margin: auto;
 background: transparent url(http://www.domain.org/images/minimized/vb4_promo_bg.jpg) no-repeat 0 0;
 height:176px;
 position:relative;
}

.promo_closed #vb4 {
 margin: auto;
 background: transparent url(http://www.domain.org/images/minimized/vb4_promo_bg.jpg) no-repeat 0 -78px;
 height:176px;
 position:relative;
}

#vb4_link {
 position:absolute;
 top:0;
 left:0;
 width:580px;
 height:132px;
 outline: none;
}

#vb4_content {
 position:absolute;
 right:0;
 top:0;
 width:324px;
 background: transparent url(http://www.domain.org/images/minimized/vb4_promo_title.png) no-repeat -2px 5px;
 min-height: 64px;
}

#vb4_content p {
 font-family:verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif;
 margin-top:46px;
 margin-bottom:26px;
 color:#FFF;
 font-size:11px;
}

#vb4_content ul {
 margin:0px;
 padding:0;
 position:absolute;
 bottom:0;
}

#vb4_content li {
 list-style-type:none;
 display:inline;
 margin-right:10px;
}

#vb4_content li a {
 color:#dd0000;
 font-family:helvetica,sans-serif;
 font-weight:bold;
 font-size:14px;
 text-decoration:none;
 outline: none;
}

#vb4_close {
 position:absolute;
 bottom:0;
 right:0;
 background: transparent url(http://www.domain.org/images/minimized/vb4_promo_minimize.png) no-repeat 0 0;
 width: 28px;
 height: 27px;
 outline: none;

}

.promo_closed #vb4_content p {
 display:none;
}

.promo_closed #vb4 {
 height:116px;
}

.promo_closed #vb4_content { 
 top:52px;
 bottom:16px;
}

#vb4_container.promo_closed {
 margin-top: -64px;
}

.promo_closed #vb4_close {
 background: transparent url(http://www.domain.org/images/minimized/vb4_promo_maximize.png);
 outline: none;
}

/* End vB4 Promo */
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01117 seconds
  • Memory Usage 1,772KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete