[jQuery] Re: "this" and z-index changes

2008-11-15 Thread CodingCyborg
Would it be plausible to create a custom tag of ? I think part of the problem is because all of the windows have 2 classes. One is the .draggableWindow the other defines the group they are in. With a custom tag it would allow for each to have one class. On Nov 14, 3:02 pm, CodingCyborg <[EMAIL P

[jQuery] Re: "this" and z-index changes

2008-11-14 Thread CodingCyborg
http://arkaydea.com/zIndexTest.php That is the closest thing I can get to the real thing. On Nov 14, 12:38 pm, ricardobeat <[EMAIL PROTECTED]> wrote: > Right. This is getting a bit complex. Judging by your code things > should be going well, could you put up a test page? > > the global vars sugg

[jQuery] Re: "this" and z-index changes

2008-11-14 Thread ricardobeat
Right. This is getting a bit complex. Judging by your code things should be going well, could you put up a test page? the global vars suggestion was a shot in the dark, if you a run loop they will be overwritten for every iteration unless the assignment doesn't execute. On Nov 14, 2:23 pm, Codin

[jQuery] Re: "this" and z-index changes

2008-11-14 Thread CodingCyborg
I have confirmed that when one of a group of windows is clicked, it runs as if every window in that group was clicked at the same time and runs the code for each of them. This causes quite an awkward outcome, but I have no idea why its happening, nor how to stop it. On Nov 14, 9:03 am, ricardobe

[jQuery] Re: "this" and z-index changes

2008-11-14 Thread CodingCyborg
Something else that may help find the problem: I currently have "groups" of windows. When you bring a window in one group to the front it brings all windows in that group to the top layers overall. Though they stay on separate layers they are being brought to front together. The other groups are a

[jQuery] Re: "this" and z-index changes

2008-11-14 Thread CodingCyborg
Sorry, I misread the change in code and the comments you added. Doing: newZ2 = zindexlt2-2; Would place all windows that were previously above the window you just brought to front on the same z-index, which I don't want. The reason for the newZ2--; is that all above it go down one level, and then

[jQuery] Re: "this" and z-index changes

2008-11-14 Thread Isaiah Fischer
So then, how would i go about making it so the variables are, in a sense, deleted after each .each() run such that its fresh when it goes through again? or is it the zindexIt2 that isn't getting pulled down into the .each() function? On Fri, Nov 14, 2008 at 9:03 AM, ricardobeat <[EMAIL PROTECTED]>

[jQuery] Re: "this" and z-index changes

2008-11-14 Thread ricardobeat
I haven't looked througly at your code, but I see you're using global variables, that might be an issue: $('.draggableWindow').mousedown(function(){ var numWindows=$('.draggableWindow').length + 500; var zindexIt2 = parseInt($(this).css("z-index"));

[jQuery] Re: "this" and z-index changes

2008-11-14 Thread CodingCyborg
jQuery('.draggableWindow').mousedown(function(){ numWindows=jQuery('.draggableWindow').size() + 500; zindexIt2 = parseInt($(this).css("z-index")); if(zindexIt2 < numWindows){ $(this).css("z-index",numWindows);