0

on browser window 550px width (mobile view):

i will to implement: if i click on the search icon the search input slide down and if i click again on the search icon the search input slide up and i don't see this.

Here my Click Event:

jQuery('#searchbutton').click(function(){

        });

Here is my Testsite:

http://devel.hoevermann-gruppe.de/

Example (550px width browser window): www.microsoft.com

4

1 回答 1

0

使用此代码:

HTML:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<a href="#">Click</a><br>
<input id="toggle" type="text">

CSS:

#toggle{
    display:none;
}

查询:

$("a").click(function(){
  $("#toggle").slideToggle();
});

jsFiddle

于 2013-10-14T19:58:49.887 回答