Hi Bill,

If you make them all children of one container, then you can process
them in a loop like so:

    var divsToSuppress, n;
    divsToSuppress = $('containerName').children();
    for (n = divsToSuppress.length - 1; n >= 0; --n) {
        divsToSuppress[n].setStyle({'zIndex': '4'}); // <= Or whatever

Alternately, if you give all of these stackable divs some class name,
you can use

    divsToSuppress = $$('div.xyz');

...at the beginning of that.

T.J. Crowder
tj / crowder software / com

On Sep 20, 12:01 pm, bill <will...@techservsys.com> wrote:
> I have little experience manipulating the dom other than using $( to
> get/set style elements so direct advice and a link for education would
> be appreciated.
> Overall, the problem I have is a bunch of stacked divs with different
> z-indexes.  Sometimes the user will want to move a dive to the front.  
> This is not a problem, but I worry that with the page open for 6 - hours
> (all functions are performed with AJAX) my z-index number will grow too
> large.
> So, what I would like to do is decrement the z-index of all the divs
> involved when incrementing the one I am bringing to the front.  I don't
> want to decrement the z-index of all the divs.
> I don't want to decrement the ones that are currently display="none" nor
> the ones that stay visible all the time, nor divs that are children of
> the stacked divs.
> The stacked divs are all children of <body>, but so are some that should
> not be affected.  If it would make the job easier, I could move all the
> stacked divs into a container div.
> So, how to walk though all the stacked divs to change their z-index, if
> currently being displayed ?
> If prototype does not offer assistance (but I can't imagine that), let
> me know and I will post in a .js group.
> --
> Bill Drescher
> william {at} TechServSys {dot} com
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to