Difference between revisions of "Template:AUC TURKEY"
Line 96: | Line 96: | ||
#submenu > ul > li > ul { | #submenu > ul > li > ul { | ||
position:absolute; | position:absolute; | ||
+ | left:0; | ||
width:100%; | width:100%; | ||
− | + | height:30px; | |
− | height: | + | |
background-color:black; | background-color:black; | ||
− | display:none;} | + | display:none; |
+ | -webkit-box-shadow: 0px 10px 36px 0px rgba(0,0,0,0.44); | ||
+ | -moz-box-shadow: 0px 10px 36px 0px rgba(0,0,0,0.44); | ||
+ | box-shadow: 0px 10px 36px 0px rgba(0,0,0,0.44);} | ||
#submenu li { | #submenu li { | ||
display: inline-block; | display: inline-block; | ||
Line 108: | Line 111: | ||
#submenu li:hover { | #submenu li:hover { | ||
background-color:lightgray; | background-color:lightgray; | ||
+ | } | ||
+ | #submenu > ul > li > ul> li > a | ||
+ | { | ||
+ | display: block; | ||
+ | color: white; | ||
+ | height: 20px; | ||
+ | border-radius:5px; | ||
+ | padding: 5px; | ||
} | } | ||
#projectname { | #projectname { | ||
Line 116: | Line 127: | ||
</style> | </style> | ||
<script>$(function() { | <script>$(function() { | ||
+ | activeSub=null; | ||
$("#menu li").hover( | $("#menu li").hover( | ||
function(){ | function(){ | ||
− | + | if(activeSub)activeSub.slideUp(200); | |
+ | activeSub=$("#sub"+$("#menu li").index(this)); | ||
+ | activeSub.slideDown(200); | ||
+ | activeSub.hover( | ||
+ | function(){ | ||
+ | }, | ||
+ | function(e){ | ||
+ | alert(e.pageY); | ||
+ | if(e.pageY>=148){ | ||
+ | activeSub.slideUp(200); | ||
+ | activeSub.off("hover"); | ||
+ | activeSub=null;} | ||
+ | }); | ||
}, | }, | ||
function(){ | function(){ | ||
− | + | ||
} | } | ||
); | ); |
Revision as of 13:40, 25 June 2015