Pho3nix
The Legend
Alright so I have this code :
Using it on a SharePoint Site From a Custom Editor WebPart but it doesn't seem to work for some reason. Anyway I could drop the javascript and use just CSS to make the hover work?
Code:
<style type="text/css">
/* PM and HDI Menu*/
#OnlineServices{position:relative; display:block; height:40px;margin:6px 0;z-index:1000}
.OS-container-collapsed{height:38px; width:298px; overflow:hidden; position: absolute; top:0; right:0; display: block; border: 1px #ccc solid;background-color:#eee; background-image:url(/_layouts/images/MNetImages/icon-expandmenu.png); background-position:255px 0px; background-repeat:no-repeat;}
.OS-container-collapsed:hover{background-color:#f8f8f8;}
.OS-container-expanded{ height:auto; width:620px; overflow:visible; position:absolute; top:0; right:0; display: block; border: 1px #ccc solid;background-color:#eee; background-image:none; -moz-box-shadow: 0px 1px 2px #999;-webkit-box-shadow: 0px 1px 2px #999;box-shadow: 0px 1px 2px #999; float:right;z-index:1000}
.OS-title {padding: 10px;font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;font-size: 14px;color: #333;cursor: pointer;}
.OS-tip {overflow:hidden;padding: 5px 0 10px;background-color:white;position:; left:-1px; width:620px; z-index:100}
.OS-tip-col {display: block;width: 300px;float: left;margin-left: 10px;}
.OS-tip-col-title {font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;font-size: 12px;color:#999;text-transform:uppercase;margin:5px 0;display:block;}
.OS-tip ul {margin:0;padding:0;list-style: none;font-size: 11px;font-family: Tahoma, Arial, sans-serif;}
.OS-tip li {margin:0; padding:0 0 0 15px;background: url('li-separator.gif') no-repeat 0 4px;display: block;}
.OS-tip li> a {color: #0f7495;display: inline-block;padding: 2px 3px;text-decoration:none;}
.OS-tip li > a:hover {color: white;background-color: #0f7495;}
</style>
<br />
<div id="OnlineServices">
<div class="OS-container-collapsed" id="OS-container">
<div class="OS-title">
Project Manager Toolkit and How Do I?</div>
<div class="OS-tip">
<div class="OS-tip-col">
<strong class="OS-tip-col-title">Project Manager Toolkit</strong>
<br />
<ul>
<li>
<a href="http://google.co.za" onfocus="OnLink(this)">
Acronyms</a></li>
<script type="text/javascript">
$(document).ready(function(){
var timer;
$('#OS-container').hover(
function(){
if(timer) {
clearTimeout(timer);
timer = null
}
timer = setTimeout(function(){
$('#OS-container').removeClass('OS-container-collapsed');
$('#OS-container').addClass('OS-container-expanded');
}, 500);
},
function(){
if(timer) {
clearTimeout(timer);
timer = null
}
$('#OS-container').removeClass('OS-container-expanded');
$('#OS-container').addClass('OS-container-collapsed');
});
});
</script>
Using it on a SharePoint Site From a Custom Editor WebPart but it doesn't seem to work for some reason. Anyway I could drop the javascript and use just CSS to make the hover work?