0

This is just something I looking to do - plz let me know if I'm going about it wrong.

Building a Dating Network and I need to open a chat/messenger box when required for 2 users to chat.

The chat box will basically be a DIV with required HTML/CSS/IMGs & user specific data - including jquery ui to allow movability.

Question - i'm looking for the best way to load these chat boxes.

I was planning on including the core HTML/CSS with the default page load with display:none; Then I could clone this code and create a new chat box.

Cloneing isn't something I've done before. Was interested to try it. I guess I could read and reuse the code with jquery.

Any advise with this?

thx

3
  • Duplicate of stackoverflow.com/questions/2156264/jquery-html-clone?rq=1 ? Commented Sep 23, 2012 at 9:25
  • Regarding your question on cloning please refer to the jQuery documentation api.jquery.com/clone , have a good read and start implementing your application. Regarding i'm looking for the best way to load these chat boxes., that question is to general and not a good fit for Q&A. Start implementing something you feel is right and then come back with specific questions on specific issues you are facing during implementation. Commented Sep 23, 2012 at 9:30
  • no worries - question was premature... thankyou... :) learning... Commented Sep 23, 2012 at 9:31

1 Answer 1

0
<script>
$(function () {
  var appendme = $("#element").html();

  $('#container').append(appendme);

});
</script>

or

$('.hello').clone().appendTo('.goodbye');
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.