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 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

Related Questions

I have a Create-View like this ... <script src=@Url.Content(~/Scripts/jquery.validate.min.js) type=text/javascript></script> <script src=@Url.Content(~/Scripts/jquery.validate.unobtrusive.min.js) type=text/javascript></script> @using
I am using JQuery Accordion. I have this page here: http://www.hauppauge.com/site/support/support_colossus.html#tabs-6 What happens is
We have some HTML buttons which we format using JQuery - $('#button').button() . Works
I am using jQuery for a simple website and have a main page 'index.html'
I have one page website only using HTML, CSS and JavaScript. I want to
Using this page, http://developer.android.com/sdk/compatibility-library.html , I have installed the Android Support Package, added a
I'm working with Django. I have an HTML page, where I do some Javascript
I have an input running in an HTML page. I'm using jQuery UI.I want
I am using jquery mobile... I have a button (data-role=button) which calls a javascript
I have saved an html page using the following line of code : NSURL

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.