append() ==> add inside
after() ==> add after
-----------------------------
Suppose the following plain HTML:
<div id="theTags">
Content inside div
</div>
---------------------------------------------------------------------------------
append()
$('#theTags').append(textTag + ' < a href=\"/text/removetag/tagid/' + i +
'\"
id=\"removeTag\" class=\"underline\" >x< /a >');
Result:
<div id="theTags">
Content inside div
textTag < a href="/text/removetag/tagid/i" id="removeTag"
class="underline">x</a>
</div>
---------------------------------------------------------------------------------------
after()
$('#theTags').after(textTag + ' < a href=\"/text/removetag/tagid/' + i + '\"
id=\"removeTag\" class=\"underline\" >x< /a >');
Result:
<div id="theTags">
Content inside div
</div>
textTag < a href="/text/removetag/tagid/i" id="removeTag"
class="underline">x</a>
-----Mensagem Original-----
De: "johannesf" <[EMAIL PROTECTED]>
Para: <jquery-en@googlegroups.com>
Enviada em: sábado, 27 de setembro de 2008 18:04
Assunto: [jQuery] Re: re[jQuery] -bind, only on first "add"
hmm, I just found out that if I use "after" insted of "append", things are
working...
like this:
$('#theTags').after(textTag + ' < a href=\"/text/removetag/tagid/' + i +
'\"
id=\"removeTag\" class=\"underline\" >x< /a >');
how to explain that?
/ johannes
--
View this message in context:
http://www.nabble.com/re-bind%2C-only-on-first-%22add%22-tp19706233s27240p19706420.html
Sent from the jQuery General Discussion mailing list archive at
Nabble.com.