d0s | .click function Go up
You are using an outdated browser. More... »
Posts d0s

No comment..))

javascript

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<script type="text/javascript">// <![CDATA[
            $(document).ready(function(){

                $('.settings').click(function(){
                    $('.head_nav').toggle();
                    $('.head_set').find('#searchform').toggle();
                    $(this).toggleClass('active');
                    return false;
                });

                $('#searchform').click(function(){  
                    $('#s').addClass("active");
                });

            });
            function searchoff() {
                $('#s').removeClass("active");
            }

// ]]></script>

html

1
2
3
4
5
<div class="head_set fl_r" id="home">
<form id="searchform" action="&lt;?php echo home_url(); ?&gt;" method="get">
<input id="s" onmouseout="searchoff(this)" type="text" name="s" value="&lt;?php printf(__('Search')); ?&gt;" onfocus=" if(this.value == '&lt;?php printf(__('Search')); ?&gt;') this.value='' " onblur=" if (this.value == '') this.value='&lt;?php printf(__('Search')); ?&gt;'" />
<input id="s" type="hidden" value="&lt;?php printf(__('Search')); ?&gt;" /></form></div>
<div class="head_nav fl_r" id="home" style="display: none;">xxxxxxxxxx</div>

css

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#home a.settings {
background: url(images/settings.gif) 10px 9px no-repeat;
display: block;
padding: 12px 19px 15px 18px;
height: 13px;
margin: 0px;
opacity: 0.7;
filter: alpha(opacity=70);
}

#home a.settings:hover, #home a.active {
background: url(images/settings.gif) 10px 9px no-repeat;
display: block;
padding: 12px 19px 15px 18px;
height: 13px;
margin: 0px;
opacity: 1;
}

#home.head_set {
margin: 0px;
padding: 0px 8px 0px 0px;
}

#home form {
display: block;
position: relative;
float: right;
padding: 9px 2px 2px 10px;
}

#home form input[type="text"] {
width: 90px;
height: 13px;
color: #7B838E;
background-image: url(images/search.gif);
background-repeat:no-repeat;
background-position: 5px 5px;
padding-left: 22px;
-moz-box-shadow: 0 1px 0 0 #6f91bb;
-webkit-box-shadow: 0 1px 0 0 #6f91bb;
box-shadow: 0 1px 0px 0px #6f91bb;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
opacity: 0.5;
filter: alpha(opacity=50);
}

#home form input[type="text"]:active, #home form input.active {
width: 150px;
height: 13px;
color: #242424;
opacity: 1;
}
Рубрики: My Work, Темы, Шаблоны
Метки:
No comments yet.

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>