Thank you knowledge for your feedback! I have been studying and tried all day and now at midnight it finally worked!
I appreciate your educational way of explaining things. At first I fought it was a great idea to put over hide and cursor to css but if i put hide inside of css visitors that dont support or have javascript on cant see the meny. And there did not seam to be a good way to put cursor in css since IE support hand and firefox only support pointer.
So what I did was that I keept the code as you helped me with that worked great in Firefox and just added:
- Code:
-
if (navigator.appName == "Microsoft Internet Explorer"){
h1[i].onclick = toggle_IE;
}
else
{
h1[i].onclick = toggle_visibility;
}
function toggle_IE(){
var sibling=this.nextSibling;
if ("none" == sibling.style.display) {
sibling.style.display = "";
}
else {
sibling.style.display = "none";
}
}
Thank you for being my javascript-friend in this so I did not felt so alone in my struggle with javascript, you made me understand a lot more about javascript and also use my own brain (not only just give away code without me understand anything) CodingForums are better then school and you are a great teacher!