Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6698067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:32:02+00:00 2026-05-26T06:32:02+00:00

$(#write).click(function(){ $(#msg).$(‘#quote’).html(); }); I am learning jquery (new to js as well). This function

  • 0
$("#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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:32:03+00:00Added an answer on May 26, 2026 at 6:32 am

    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/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In jQuery, is there another way to write this? Version 1 $(#date_filter-enable).click(function() { $(#search_dates).removeClass(hidden);
I write some jQuery codes as below: $('.button').each(function(){ $(this).click(function(){ console.log($(this)); do_sth(); }); }); var
Normally you write a handler for a button click like this: $(document).ready(function() { $(button).click(function()
I've got this function $(a[href*=/category/movies/]).click(function() { so.addVariable('stretching','fill'); so.write('mediaspace'); }); that I want to turn
Possible Duplicate: Jquery event chaining Traditionally we may write: $(selector).click(function () { }); but
I've my jQuery code as $('#tarea').click(function() { // Do stuffs }); This works fine
In jQuery, I have the following: $('td').click(function(myEvent) { var local = { tr:$(this).closest('tr') };
i write row click handler: $('#mTable tr').unbind().live('click', function() { //specialFunction() }); specialFunction must not
When I write $(#new_lang).click(function(e) { alert(something); e.stopPropagation(); }); What is e here, and why
I generally write code that looks like this (but with many more handlers). $(document).ready(function()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.