Solved

changing layer order/stacking

Posted on 2003-11-24
2
198 Views
Last Modified: 2010-04-06
Hi,

I am trying to change the order of layers i am drawing dynamically.  I want to bring the layer i select to be the top layer (i.e. dynamically change the zindex), and each time i select a different layer that should be the top layer.

Does anyone know how to do this?  (need an example)

Thanx
0
Comment
Question by:Jyontex
2 Comments
 
LVL 17

Accepted Solution

by:
dorward earned 50 total points
ID: 9810860
Untested, but I guess this will work.

<script type="text/javascript">
var z = 1;
function up(el) {
  el.style.zIndex = ++z;
}
</script>

<div onclick="up(this);">foo</div>
0
 

Author Comment

by:Jyontex
ID: 9811013
works.  Thank you.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now