0

我正在尝试使用 jquery 制作 vk.com 风格的右上角菜单。当我们单击设置符号时,它会显示几个链接,其代码如下所示。我正在尝试使用jquery,所以我尝试使用slideup和slidedown,但我想要与vk.com完全一样,点击后它显示在左侧,鼠标移除后隐藏

<tr>
  <td class="top_home_link_td">
    <div id="top_logo_down" class=""></div>
    <a onmouseup="removeClass('top_logo_down','tld_d');" onclick="return nav.go(this, event);" onmousedown="addClass('top_logo_down','tld_d');" href="/feed" class="top_home_link"></a>
  </td>
  <td class="top_back_link_td"></td>
  <td style=""><nobr>
    <a onmouseover="gSearch.preload();" onclick="return nav.go(this, event, {search: true, noframe: true});" onmousedown="event.cancelBubble = true;" ontouchstart="event.cancelBubble = true;" href="/search" id="top_search" class="top_nav_link">search</a>
  </nobr></td>
  <td style="" id="support_link_td"><nobr>
    <a onclick="return nav.go(this, event);" onmousedown="event.cancelBubble = true;" ontouchstart="event.cancelBubble = true;" href="/support?act=new" id="top_support_link" class="top_nav_link">help</a>
  </nobr></td>
  <td style="" id="invite_link_td"><nobr>
    <a onclick="return nav.go(this, event);" onmousedown="event.cancelBubble = true;" ontouchstart="event.cancelBubble = true;" href="/invite" id="top_invite_link" class="top_nav_link">invite</a>
  </nobr></td>
  <td id="logout_link_td"><nobr>
    <a onclick="if (checkEvent(event) === false) { location.href = this.href; return cancelEvent(event); }" onmousedown="event.cancelBubble = true;" ontouchstart="event.cancelBubble = true;" href="https://login.vk.com/?act=logout&amp;hash=906cc70a366d6dd462&amp;from_host=vk.com&amp;from_protocol=http" id="logout_link" class="top_nav_link">log out</a>
  </nobr></td>
  <td><nobr>
    <a onmousedown="event.cancelBubble = true; TopSearch.toggleSettings()" ontouchstart="event.cancelBubble = true;" onmouseout="TopSearch.settingsOut()" onmouseover="TopSearch.settingsOver()" class="ts_settings active" id="ts_settings" style="opacity: 1;"></a>
  </nobr></td>
</tr>
4

1 回答 1

0

查看 .on('点击',function(){}); 和 .on(' mouseout ',function(){}); jQuery 函数。

于 2012-05-15T19:10:36.993 回答