Jquery 单击时搜索框消失
我有一个滑动图像面板,使用Jquery 单击时搜索框消失,jquery,Jquery,我有一个滑动图像面板,使用 $('input').click(function() { $(this).parent().slideUp(); 不幸的是,滑动面板上的输入部分会导致页面顶部的搜索框在单击时消失,因为搜索表单使用“input type=“text”等。是否有办法解决此问题?下面是使滑动面板工作的代码 搜索表单的代码为: <!--BEGIN #searchform--> <form class="searchform
$('input').click(function() {
$(this).parent().slideUp();
不幸的是,滑动面板上的输入部分会导致页面顶部的搜索框在单击时消失,因为搜索表单使用“input type=“text”等。是否有办法解决此问题?下面是使滑动面板工作的代码
搜索表单的代码为:
<!--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
使选择器更具体地针对您想要的输入:
$("#team_section .team_member_photo").next().hide().append('<input type="button" value="close" name="close" />');
$("input[name=close]").click(function() {
$(this).parent().slideUp();
});
$(“#team_section.team_member_photo”).next().hide().append(“”);
$(“输入[name=close]”。单击(函数(){
$(this.parent().slideUp();
});