Give help. Get help.

  • # April 12, 2010 at 5:27 pm

    Okay, just used Chris’ snippet on making a div clickable. Now, I would like to take the text in my p tag and place it in a text area on my page. For example, here is my jQuery:

    window.location =$(this).find(‘p.answer’);


    Now, I want to take whatever is in a paragraph tag with the class of answer and place it into my text area. Is there a way to do this? I’m a jQuery noob, but I know I could do something like this using AJAX and .NET.

    # April 12, 2010 at 7:59 pm

    I think this should do it. The p tag at the beginning is the paragraph you want to target and inside the append is the opening and closing tags of your text area that you want to target. Tell me how it goes.

    # April 13, 2010 at 9:32 am

    So, I tried that and nothing came of it. Here is the code I have now:

    window.location = $(this).find(“p”).text();

    What happens when you click on this you get a 404 error. I tried it with out the second line, but then nothing happens on the site.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.