$("#write").click(function(){
$("#msg").$('#quote').html();
});
I am learning jquery (new to js as well). This function writes to a textbox id=msg. However I am having problems pulling the content.
How do I pull the content of a div and use in my function (#quote)? Right now it just writes #quote, not the content of the div called quote.
Also tried:
var quote = $("#quote").html();
$("#msg").$(quote.val).html();
Out of ideas.
just like you wrote, but the second line should be
$("#msg").html(quote);.The content of #quote is already in
quote, and in order to replace the content of #msg with it, you pass it as a string to.html().More about
.html(): http://api.jquery.com/html/