Solved

changing layer order/stacking

Posted on 2003-11-24
2
204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…
Suggested Courses

615 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