Inject / set

36 views
Skip to first unread message

Sid-ahmed D

unread,
Aug 1, 2010, 5:16:25 PM8/1/10
to MooTools Users
Hi all,

I wonder if it is possible to add content without deleting the
existing content of a div # example.

http://jsfiddle.net/6kspb/

Desired result is -
Hi, my name is : Sid


Thanks :)

Fábio M. Costa

unread,
Aug 1, 2010, 5:21:57 PM8/1/10
to mootool...@googlegroups.com
yes there is :D

http://jsfiddle.net/6kspb/1/

just use appendText function.

--
Fábio Miranda Costa

Sid-ahmed D

unread,
Aug 1, 2010, 5:26:02 PM8/1/10
to MooTools Users
Thank you for your reply :)

is there a similar function for the html?
http://jsfiddle.net/6kspb/2/



On 1 août, 23:21, Fábio M. Costa <fabiomco...@gmail.com> wrote:
> yes there is :D
>
> http://jsfiddle.net/6kspb/1/
>
> just use appendText function.
>
> --
> Fábio Miranda Costa
>

Sid-ahmed D

unread,
Aug 1, 2010, 5:29:15 PM8/1/10
to MooTools Users
AppendHTML exist on Jquery but not on Mootools ??

On 1 août, 23:21, Fábio M. Costa <fabiomco...@gmail.com> wrote:
> yes there is :D
>
> http://jsfiddle.net/6kspb/1/
>
> just use appendText function.
>
> --
> Fábio Miranda Costa
>

Sid-ahmed D

unread,
Aug 1, 2010, 5:34:02 PM8/1/10
to MooTools Users
I found this :

Element.implement({
appendHTML: function(html) {
this.set('html',this.get('html')+html);
return this;
}
});

MIhaitza

unread,
Aug 1, 2010, 5:37:30 PM8/1/10
to MooTools Users

MIhaitza

unread,
Aug 1, 2010, 5:37:59 PM8/1/10
to MooTools Users
or http://jsfiddle.net/6UqAP/

On Aug 2, 12:34 am, Sid-ahmed D <sidahmed.djell...@gmail.com> wrote:

Sid-ahmed D

unread,
Aug 1, 2010, 5:42:31 PM8/1/10
to MooTools Users
Perfect Thank you Mihaitza and Fabio M.Costa :)

On 1 août, 23:37, MIhaitza <poze.la.cer...@gmail.com> wrote:
> orhttp://jsfiddle.net/6UqAP/
Reply all
Reply to author
Forward
0 new messages