/    Sign up×
Community /Pin to ProfileBookmark

treemenu item expansion fails under Opera.

Hi everyone!

Following tree-like menu works fine on IE an FireFox, but for some reason fails under Opera. In Opera instead of minus.png, which should be displayed on item expansion, a regular bullet displayed. I have tried almost every possible combination of styles (block, list-item, etc) and in every possible location.. without any success.

Perhaps some know what the problem might be? Thanks in advance.

(sorry for my bad english)

[CODE]<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN” ><html><head><meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ /><title></title>

<style type=”text/css”><!–

BODY{ margin-left: 0px; margin-top: 0px; margin-right: 1px; margin-bottom: 1px; background-color: #000000;}

#xmenu, #xmenu ul{text-align:left;margin:0;padding:0;}

#xmenu .wop{display:none;}

#xmenu .dir{margin:0 0 0 30px;padding:0; list-style-image:url(img/plus.png);}

#xmenu .fil{margin:0 0 0 30px;padding:0;list-style-image:url(img/page.png);}

–></style>

<script type=”text/javascript”><!–

function expand(x){

x.getElementsByTagName(“ul”)[0].style.display=(x.getElementsByTagName(“ul”)[0].style.display==”block”)?”none”:”block”;
x.style.listStyleImage=(x.getElementsByTagName(“ul”)[0].style.display==”block”)?”url(img/minus.png)”:”url(img/plus.png)”;

}

function m_over(x){
x.style.color=”red”;
x.style.backgroundColor=”green”;
x.style.cursor=”pointer”;
}

function m_out(x){
x.style.color=”red”;
x.style.backgroundColor=”transparent”;
x.style.cursor=”default”;
}

//–>
</script>

</head><body>

<ul id=xmenu>

<li class=dir><a onMouseOver=’m_over(this)’ onClick=’expand(this.parentNode)’ onMouseOut=’m_out(this)’> New Folder</a><ul

class=’wop’><li class=fil>435435</li><li class=fil>sadf43w</li><li class=fil>sfd</li></ul></li>

</ul></body></html> [/CODE]

to post a comment
Full-stack Developer

0Be the first to comment 😎

×

Success!

Help @arafel_ spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...