jquery - Logic for stacking behaviour in javascript -


I am trying to write some javascript which will stack the object by setting the z-index.

Test case:

I have hacked together, but I want to extrapolate that behavior a bit more logically. It is:

Given the number of elements, when element C is moved to the top, then all the elements above that element wade below 1, while all elements of the element beneath that element Must stay on

A "linked list" makes for a good data structure when you are talking like this Keep track of the order of your stackable elements through a series of simple nodes.

  // ListNode {value: {} Next: {& lt; ListNode & gt;}}  

.. and updated or added sequence as new nodes.

I did an example of a list used for deep sorting on the following URL:


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -