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

  • SEARCH
  • Home
  • 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 8410335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:08:51+00:00 2026-06-10T00:08:51+00:00

I have two jQuery UI dialogs (unrelated to each other but both are exhibiting

  • 0

I have two jQuery UI dialogs (unrelated to each other but both are exhibiting this behavior) that behave perfectly the first time they’re opened and closed. Once they’re closed for the first time though they won’t reopen. Below is the code for one of them, the other has an identical structure. I’m not calling ‘destroy()’ or ‘remove()’ anywhere so I’m not sure why these won’t work properly. Here’s my code:

$(".qr_link").click(function(){
  openQr(this);
});

function openQr(that){
  var title = $(that).parent().parent().children("p.resume-name").text();
  var qr = $(that).parent().parent().children(".qr_image");

  $(qr).dialog({
    title: title,
    width: 'auto',
    height: 'auto',
    modal: true
  });
}

My markup:

<div class="resume">
  <p class="resume-name"><%= link_to(offer.name, public_url(offer.public_id, :host => ApplicationSetting.short_domain, :params => {:rid => @recruiter_id})) %></p>
  <p id="resume_links">- 
    <%= link_to("QR", "#", :class => "qr_link") %>
    <%= link_to("X", "#", :class => "remove_link") %>
    <%= link_to("Preview", "#", :class => "preview_link") %>
  </p>
  <%= qr_image(public_url(offer.public_id, :host => ApplicationSetting.short_domain, :params => {:rid => @recruiter_id}), "200x200", "hide qr_image")%>
  <p class="resume-tags"><span class="resume-tags-label">Tags: </span><span class="resume-tags-value">
    <%= offer.tags.join(", ") %>
  </p>
  <p class="resume-description"><%= offer.description %></p>
</div>

Thanks in advance.


Update


So initially, I have the qr image loaded when the page loads but I have it hidden. It displays fine in the dialog, but when the dialog appears, the qr image gets removed from the HTML! So I guess the reformatted question is, “Why is my QR Code being deleted?”

  • 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-10T00:08:52+00:00Added an answer on June 10, 2026 at 12:08 am

    $(qr).dialog({...}) initializes and opens the dialog just once. If you want to open it again you need to call .dialog('open') on the element.

    As to the updated question: dialog moves its content from where ever you had it, wraps it in a container with styling and then appends it to the end of the document. However the way you are getting the dialog element won’t work now as its been moved.

    I would recommend using IDs to reference the dialog content instead of traversing through the DOM. You could store that ID as a data attribute on the element that is being clicked.

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

Sidebar

Related Questions

So I have two jquery functions that bassically do the same, but on 2
I have a ninput and two spans, each with a jquery ui icon that
On my website I have two jQuery UI dialogs. One dialog just shows gif
I'have a dialog box in JQuery that have two buttons. When the button Upload
I have two jQuery functions. The first one below I want to run first,
I have two jquery ui datepickers in my page and I would like to
Assuming I have the following two JQuery functions - The first, which works: $(#myLink_931).click(function
I have two variables in a jquery code and if item.a not exist, it
I have two buttons at the top of a jQuery validated form: one saves
I have two bits of code: a form and a jQuery function. My problem

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.