Where have you added the $('#another').click() ?
Is it even in $(document).ready() or not ? Are you sure that the click
handler is even being called ?

I have created a test.html and tested what you want, it works perfectly for
me.

<html>
  <head>
    <title></title>
    <script src="http://code.jquery.com/jquery-latest.pack.js";
type="text/javascript" language="javascript" charset="utf-8"></script>
    <script type="text/javascript" language="javascript" charset="utf-8">
      // <![CDATA[
        $(document).ready(function() {
            $('#another').click(function() {
              $('#word').after('<label for="word2"></label><input
type="text" name="word2" id="word2" value="" size="50" />');
            });
        });
        // ]]>
      </script>
  </head>
  <body>
    <label for="word">Texto:</label>
    <input type="text" name="word" id="word" value="" size="50" />
    <a href="#" id="another">Adicionar criterio</a>
  </body>
</html>

Thanks & Regards,
Dhruva Sagar.


Jonathan Swift<http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html>
- "May you live every day of your life."

On Tue, Nov 3, 2009 at 8:53 AM, ReynierPM <rper...@uci.cu> wrote:

> Dhruva Sagar wrote:
>
>> You should be doing $('#word').after('<label for="word2"></label><input
>> type="text" name="word2" id="word2" value="" size="50" />');
>>
>
> This doesn't work too. I try and get none HTML input added after
> input#word. Why?
>
> --
> Saludos
> ReynierPM
>

Reply via email to