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 8206895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:49:50+00:00 2026-06-07T08:49:50+00:00

Background I have been using the JQuery UI plugin for creating a dialog that

  • 0

Background

I have been using the JQuery UI plugin for creating a dialog that loads dynamic content.

So I load up an html document that displays a series of selectable items with checkboxes containing values: A, B, C, D, E

So let’s say I checked off “A, C, E”

I press a submit button, which makes use of an AJAX call to the server. The server takes in the data “A, C, E”, performs a series of queries and spits out data and html to hold the data contents. Like:

<input id="radio1" name="selGroup" type="radio" value="1"><p class="test"> 1 </p>
<input id="radio3" name="selGroup" type="radio" value="3"><p class="test"> 3 </p>
<input id="radio5" name="selGroup" type="radio" value="5"><p class="test"> 5 </p>
<input id="enterBttn" type="button" value="Submit">

This html content comes back to the client and get’s dumped into:

<div id="dialogCheck" title="Select one of these options"></div>

This is done by using the jQuery:

$("#dialogCheck").html(content);

Test

So I check to see if everything is working, and it does. I get a dialog box with my radio buttons and values that I want to select. But now I want to add some interactivity.

Problem

When I open up a dialog box with the injected html from the server, it shows the contents on the screen, but when I want to see the new html on the original source code. It doesn’t exist. It just shows up as:

 <div id="dialogCheck" title="Select one of these options"></div>

When I used JQuery’s “$(“#dialogCheck”).html(content);” to insert. I read the documentation, and it mentions how it doesn’t append html to the original source code. So My question is, how am I supposed to add JQuery scripts on top of the html that I inject?

The Wierd

If I pass in something that looks like this:

$("#enterBttn").click(function(){ 
     $( "#dialogCheck" ).dialog("destroy");
 });

It works! The enterBttn I created destroys the dialog box. However if I want to add hover functionality, like if I want to highlight text or outline divs on top of the dialog box, it won’t work because it doesn’t exist on the original source code.

$(".test").hover(
    function(){
        $(this).append($("<span> ***</span>"));
    },
    function(){
        $(this).find("span:last").remove();
});
  • 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-06-07T08:49:52+00:00Added an answer on June 7, 2026 at 8:49 am

    One CAN use event handling on html elements inserted through AJAX.
    The jquery ON() http://api.jquery.com/on/ function can be used for that purpose, or when an older version of jquery is used, use the LIVE() function.

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

Sidebar

Related Questions

I'm using jQuery ThickBox plugin ( http://jquery.com/demo/thickbox/ ). I have been concentrating on functionality
Recently, I have been trying to accomplish creating a full-width jQuery slider that would
I'm using Backstretch jQuery plugin to create full screen background images, but have a
I come from a Java background and have been using C# for the last
I'm using jquery-1.4.2.min.js and jquery-ui-1.8.1.custom.min.js. According to Firebug, both minimized scripts have been loaded.
Since version 1.4 of jQuery; you have been able to create an element using
I have a code in javascript and I am using jQuery Calculation plugin (can
I have been trying to create rotating object using jQuery and without any other
I've been using Jquery for some time now and I have a question concerning
I have been working on a project that dynamically creates a javascript file using

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.