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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:21:15+00:00 2026-06-07T23:21:15+00:00

So, I have jquery spitting out containers with h4’s inside. Each of these containers

  • 0

So, I have jquery spitting out containers with h4’s inside. Each of these containers contains a “remove” button. When you click this remove button you get a jquery UI dialog confirm prompt. This prompt basically says:

Are you sure you wish to remove ((Contents of H4 tag)) ?

Here is the html…

<div class="container">
    <h4>Title of Item</h4>
    <div class="remove">Remove</div>
</div>

<div class="remove-dialog">
    Do you wish to <strong>remove the <span class="account-name">((Account Type))</span></strong>  account from

your application?

**Here is my jQuery**
    // Remove Added Account and Subtract from Account count
        $('.remove').live('click',function() {
            var current = this
            var AccountName = $(this).closest('div').children('h4')
            console.log(AccountName)    

            $(".remove-dialog").dialog({
                buttons : {
                    "Yes" : function() {
                        $(this).dialog("close");
                        $(current).parents("div:first").remove()
                        Accounts--
                        $('.account-count').val(Accounts).change()
                },
                    "No" : function() {
                        $(this).dialog("close");
                    }
              }
            });
            $('.remove-dialog').dialog("open"); 
        });

So what I want is to populate the ((Account Type)) with the h4 in the same container. Thanks in advance for any help.

  • 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-07T23:21:17+00:00Added an answer on June 7, 2026 at 11:21 pm

    something like this?

    it’s this line that gets you to the title:

    var AccountName = $(this).parent().find('h4').text();
    

    this line sets the text:

    $(".account-name").text(AccountName);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have jQuery code which looks something like this on Button1 Click $('table.result_grid tbody
I have some PHP code which runs a loop, spitting out a button and
I have JQuery tabs in my view. Each tab contain a partial view. Some
I have a $.each jQuery function sitting in a parent javascript function, how do
I have code like this: $(document).ready(function () { $('.accessLink') .bind('click', accessLinkClick); $('#logoutLink') .click(function (e)
I have jquery function: function handleSplittingPrices() { var customerId = $(this).val(); loadSplittingPrices(customerId); } I
I have built a sortable list using jQuery UI's sortable feature, this is working
Hello I have been using JQuery for quite a while. I need to get
using jquery-1.6.1.min.js and jquery-ui-1.8.13.min.js. I have a textbox sitting inside a jquery dialog <div
I'm pulling my hair out with this one... My app is running on jquery-mobile

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.