Just to get things straight:
var el = new Element('div', {
style: 'border: 1px solid red; margin 1em;'
});
Is perfectly feasable and will work.
> var el = new Element('elem', attributes);
> el.style.border = border; // and other css rules if needed
> el.observe('click', action);
>
My be such wrapper around "new Element()" will be useful, but Ask your
self when you insert nodes where do you insert them, or how (with
appendChild, insertBefore, insertAfter, ), an when inserting item
do you just create it, or add events or do other things except that ?
mainly I do some thin
On May 30, 9:06 am, "Mislav Marohnić" <[EMAIL PROTECTED]>
wrote:
> On 5/30/07, timcharper <[EMAIL PROTECTED]> wrote:
>
>
>
> > What do you think if we added a shortcut method to
> > an instantiated method capable of building and appending a new element
> > to it in one swoop?
>
> So you're propo
On 5/30/07, timcharper <[EMAIL PROTECTED]> wrote:
>
>
> What do you think if we added a shortcut method to
> an instantiated method capable of building and appending a new element
> to it in one swoop?
So you're proposing a wrapper around "new Element(); appendChild()"? It's
useful, yeah... But i
> Радослав (Radoslav?) is right, we already have this:
>
> my_div = new Element("div");
> my_div.insert(new Element("h1").update("Hello there!"));
> my_div.insert(new Element("p").update("Hello, here is some
> text").setStyle({fontSize: "25px" }));
Wow! Looks like I'm just barely too late to su
On 5/29/07, timcharper <[EMAIL PROTECTED]> wrote:
>
>
> my_div = Element.build("div");
> my_div.build("h1", { innerHTML: "Hello there!" } );
> my_div.build("p", { innerHTML: "Hello, here is some text" },
> { fontSize: "25px"});
Радослав (Radoslav?) is right, we already have this:
my_div = new El
this sounds like:
$('some_element_id').appendChild( new Element(tagName, options) );
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to prototype-core@goo