Hi,

im pretty new to _javascript_, so im full of questions. As my main tool in this new endeavor is mochikit, i thought you guys could help me answer some questions i have.

Im tring to create a set of widgets/visual components for my web application, and i find that there is no 'stadard' way to do that. Just a lot of DOM hackery.

For example, i want to implement a slider/splitter (ala wxsplitter).

What i would like is to be able to do something like this:
<div id="mainSplit" class="splitter">
       <div>PANEL 1</div>
       <div>PANEL 2</div>
</div>

and then:
$('mainSplit').setSplit("30%");

right now im walking the DOM and replacing the classes i know with the combination of elements i need to implement the control.

My idea is that one should be able to do
SPLITTER({}, DIV({}, "PANEL 1"), DIV({}, "PANEL 2"));
to work with this new controls as if they were DOM elements.

I dont have any nice idea about how to implement the $(id).method part, as i would like to be able to have objects with state. Im thinking about an object registry and hacking the getElements functions. But this all seems so basic that im wondering about reinventing the wheel or mising the zen of _javascript_. I mean, didnt everyone come to the need to create new components? How did you solve it?

tia,

Lucio.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to