Hi,
I have a JQuery slide out menu which has an onclick event applied to an image ID, it works fine in IE & FF (well there is some funkyness with FF when the animation runs), but in Opera it only works when you click the border of the image, then the menu slides out.
Interestingly it only happens on the first page load, after that you can click anywhere on the image and it works normally?
the page is
The code in question is
HTML
CSS
JavaScript
Your help is appreciated.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Google Rank Extractor -> Perl beta with FusionCharts
I have a JQuery slide out menu which has an onclick event applied to an image ID, it works fine in IE & FF (well there is some funkyness with FF when the animation runs), but in Opera it only works when you click the border of the image, then the menu slides out.
Interestingly it only happens on the first page load, after that you can click anywhere on the image and it works normally?
the page is
The code in question is
HTML
Code:
<div id="popout">
<div id="cap">
<img id="open" src="/images/slide-button.gif" title="Click for slide out menu" alt="Click for slide out menu" />
</div>
<div id="adbox">
<!-- Slide out menu content not included -->
</div>
</div>
Code:
#popout {
font-size:.8em;
float:left;
margin: 0;
padding: 0;
position: absolute;
z-index: 100;
overflow: hidden;
margin-top: 175px;
margin-left: 40px;
height: 140px;
padding-right:1px;
}
#cap {
width: 28px;
height: 137px;
position: relative;
left: 0;
z-index: 102;
border:none;
}
#cap img {
border-top:1px dashed #01a9c0;
border-right:1px dashed #01a9c0;
border-bottom:1px dashed #01a9c0;
border-left : none;
cursor:pointer;
}
#adbox {
background-image:url('/images/background.gif');
background-position:top left;
background-repeat:repeat-y;
position:absolute;
border-top:1px dashed #01a9c0;
border-bottom:1px dashed #01a9c0;
border-right:1px dashed #01a9c0;
left: 28px;
top:0;
z-index: 101;
margin-left: -510px;
height: 137px;
}
Code:
function openAd() {
$(popOut).width(adWidth+"px");
$(adBox).animate({marginLeft: "0"},1200)
isExtended = 1;
document.getElementById('open').src = '/images/slide-button-active.gif';
}
function closeAd() {
$(adBox).animate({marginLeft: "-"+adWidth+"px"},1200,"linear",
function(){ $(popOut).width($("#cap").width() + "px"); }
);
isExtended = 0;
document.getElementById('open').src = '/images/slide-button.gif';
}
$("#open").click(function() {
if(isExtended == 0){
openAd();
}
else {
closeAd();
}
createCookie('SB',isExtended,1);
return false;
});
Your help is appreciated.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Google Rank Extractor -> Perl beta with FusionCharts