Jump to content
php.lv forumi
  • 0

Uzkliskinot atveras un paliek SPAN


PacStyle

Question

Man vajag lai uzspiezhot piem uz pogas paradas span un pazuu tikai tad, kad uzspiezh kur citur...

pagaidaam ir uzejot ar peli lai paraadaas un noeejot no menu pazud...

 

Paldies!

<script type="text/javascript">
$(document).ready(function() {

$("ul#topnav li").hover(function() { 
	$(this).css({ 'background' : '#000 url(bildes/aktivais.gif) repeat-x'}); 
	$(this).find("span").show(); 
} ,

function() {
	$(this).css({ 'background' : 'none'}); 
	$(this).find("span").hide(); 
});

});
</script>

 

 

CSS





ul#topnav {
margin: 0; padding: 0;
width: 864px;
float: left;
list-style: none;
position: relative; 
font-size: 12px;
height: 70px;
background: url(bildes/augsa.gif) repeat-x;
}
ul#topnav li {
float: left;
margin: 0; padding: 0;
border-right: 1px solid #b2bcca; 
height: 30px;
}
ul#topnav li a {
padding: 10px 15px;
display: block;
color: #f0f0f0;
text-decoration: none;
}
ul#topnav li:hover { background: #000 url(bildes/aktivais.jpg) repeat-x; }
ul#topnav li:focus { background: #000 url(bildes/aktivais.jpg) repeat-x; }
ul#topnav li span {
float: right;
padding: 15px 0;
position: absolute;
height: 9px;
left: 0; top:35px;
display: none; 
width: 864px;
background: #000;
color: #fff;

-moz-border-radius-bottomright: 5px;
-khtml-border-radius-bottomright: 5px;
-webkit-border-bottom-right-radius: 5px;

-moz-border-radius-bottomleft: 5px;
-khtml-border-radius-bottomleft: 5px;
-webkit-border-bottom-left-radius: 5px;
}
ul#topnav li:hover span { display: block; }
ul#topnav li span a { display: inline; }
ul#topnav li span a:hover {text-decoration: underline;}


Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Shis kods nav tavs, palasi labak tutoriali un komentus pie ta.

 

Es vel iedotu span'am kadu klasi un ar jqeury mekletu pec klases un hiddot.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...