2013-05-13 77 views
0

我有一个使用搜索框消失

$('input').click(function() { 
$(this).parent().slideUp(); 

一个滑动的图像面板不幸的是,滑动面板上的输入部分使搜索框位于页面顶部的消失的时候,因为搜索表单点击?使用“输入型=”文本”等,是有办法来解决这个问题下面是使滑动面板工作http://jsfiddle.net/pcD8D/7/

,为searchform代码的代码是:

  <!--BEGIN #searchform--> 
      <form class="searchform" method="get" action="<?php bloginfo('url'); ?>"> 
       <input type="text" class="textBox" name="s" onclick="this.value=''" value="Enter your search" tabindex="1" /> 
            <img src="<?php bloginfo('stylesheet_directory'); ?>/images/clearBtn.png" width="17" height="17" class="cancelBtn" alt="ClearBtn" /> 
      <!--END #searchform--> 
      </form 

感谢

回答

2

让您选择更具体的目标只是你想要输入:

$("#team_section .team_member_photo").next().hide().append('<input type="button" value="close" name="close" />'); 

$("input[name=close]").click(function() { 
    $(this).parent().slideUp(); 
}); 
+0

由于米洛,该诀窍! – 2013-05-13 15:43:02