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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:29:01+00:00 2026-05-16T05:29:01+00:00

I have a html page using a jQuery UI Button with some jQuery script

  • 0

I have a html page using a jQuery UI Button with some jQuery script like this:

<script type="text/javascript">
 $('button).button(); // sets up the jQuery UI button style
 $('#btnClose').live('click',function () {
   $.get('content.html', function (data) {
     $('#EditCategory').html(data);
   });
 });
</script>

<html>
  <button type="button" id="btnClose'">Close</button>
  <div id="EditCategory" class="category"></div>
</html>

On the content.html page I have:

<button type="button" id="btnNewCategory">Add new category</button>

When I click on ‘#btnClose’ the content.html is returned and the button is displayed but
the jquery ui css styling is lost. Is this because the css style is applied before the
DOM is reconstructed? If so, is there anything I can do like using .live() to ensure the
CSS gets applied?

Thanks for the 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-05-16T05:29:02+00:00Added an answer on May 16, 2026 at 5:29 am

    You’ll need to apply the button styling to that content after you’ve inserted it:

    $('#btnClose').live('click', function() {
      $.get('content.html', function(data) {
        $('#EditCategory').html(data);
    
        $('#EditCategory button').button();
      }
    });
    

    Unfortunately, there isn’t a .live() analog for applying plugins. The technique it uses is only useful for catching and handling events.

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

Sidebar

Ask A Question

Stats

  • Questions 498k
  • Answers 499k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can create an updated assembly, sign it and push… May 16, 2026 at 12:26 pm
  • Editorial Team
    Editorial Team added an answer After digging into Grails more, i came to a solution.… May 16, 2026 at 12:26 pm
  • Editorial Team
    Editorial Team added an answer You are setting the activity's view by calling setContentView which… May 16, 2026 at 12:26 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have an HTML page. I have created a frame using background repeat function.
I have an asp.net panel with a style which hides it and I'm using
I have n number of select elements in an html page that are used
I have an aspx page with four UpdatePanels. Incidentally, each UpdatePanel corresponds to a
I have an ASPX page where in the page load i am dynamically creating
I have a parent page that contains a textarea and a link to open
I'm using jQuery to control an image gallery that will display any of several
This seems to be a common problem among coders from different languages. I'm using
I'm having problems with IE6 and javascript applied to ajax content. I'm not able
I am trying to make my pagination script a bit more dynamic and am

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.