2013-08-27 42 views
-1

我的菜單從我的頁面開始打開,我需要它開始關閉。我已經貼了兩jQuery和使用PHP的HTML:jQuery菜單在頁面加載後打開,應該從關閉開始

// Location drop 
var local_config = { 
    sensitivity: 2, // number = sensitivity threshold (must be 1 or higher) 
    interval: 80, // number = milliseconds for onMouseOver polling interval 
    over: doOpen, // function = onMouseOver callback (REQUIRED) 
    timeout: 500, // number = milliseconds delay before onMouseOut 
    out: doClose // function = onMouseOut callback (REQUIRED) 
}; 
function doOpen() { 
    jQuery('#locations_header_wrap').slideDown("fast"); 
    jQuery(this).addClass('active'); 
} 
function doClose() { 
    jQuery('#locations_header_wrap').slideUp("medium"); 
    jQuery('.header-locations-drop-link').removeClass('active'); 
} 
jQuery('.header-locations-drop-link').hoverIntent(local_config); 
  <?php $locations = gb_get_locations(); 
     if (!empty($locations) && !is_wp_error($locations)) : ?> 
      <div id="location"> 
       <div class="header-locations-drop-link gb_ff"> 
        <span class="current_location"><?php gb_current_location_extended(); ?></span> 

        <div id="locations_header_wrap" class="clearfix cloak header_color font_small"> 
         <?php gb_list_locations(); ?> 
         </div><!-- #locations_header_wrap. --> 
        </div> 
      </div> 
     <?php endif; ?> 
+1

哦,你會給我一美元嗎? – Reigel

+0

我添加了上面的代碼 – user2680299

回答

0
<style type="text/css"> 

#locations_header_wrap{display:none} 

</style> 
0
$('.hidden').slideUp(1).delay(2000).slideDown('slow'); 

這只是一個原型代碼集成..

JSFIDDLE DEMO

+0

我不明白你的答案 – user2680299