|
|
|
|
| Advertise on this site |
I'm beginning series of articles where step by step describe ajax photo gallery developing process. This gallery I have created for one of my projects.
Develop ajax gallery with not limited nesting in categories. Categories should support localization (in my case English and Russian ) Should be administrative panel. Everything what possible implement with help of Ajax.
At the beginning of process I get html template of gallery. Not ideal, but everything clear with concept.
Basic idea of tree Html and CSS I got from here . But that tree can have only one nested level and doesn't work in IE.
So it seems to be first task.
Task is clear. First what I want to do, add IE support to and not limited nesting to the tree. Do this using plain Html and CSS. Dynamic generation will be little bit later.
As result I got such tree. As can maybe seen from picture pervious looking is slightly different.
This picture created from such Html:
The next task to create with help of JavaScript the same Html.
On input should be pulled data. Data format is obvious.
With help of favorite text editor create test JSON data. With help of this data the tree of categories will be displayed.
So let's do tree rendering.
Render the tree.
Object structure is pretty simple, tree class, and node class:
Tree - keeps nodes, rendering, etc.
TreeNode - implementation of node logic.
These do work.
Here is the
Amazing ,how can he do that!
I like this post. It help me
pretty! I wish you can keep
Thanks for sharing the post!
I can use it in
That's very nice plugin! I
These tips help me a lot!
Thanks for sharing the post!
Very good plugin! I like it!
Comments