Solved

changing layer order/stacking

Posted on 2003-11-24
2
203 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
The viewer will learn how to count occurrences of each item in an array.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

751 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