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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:24:48+00:00 2026-06-14T00:24:48+00:00

I have a cart that’s graphically styled with a CSS file. However, when I

  • 0

I have a cart that’s graphically styled with a CSS file. However, when I update the cart through jQuery and AJAX, the reloaded version is not styled.

Is there any jQuery function to apply already loaded styles to a dynamically generated element?

I know I could use .css() function to add the style manually, but I’d rather avoid that and be able to load the existing properties automatically, so that it doesn’t become messy if I make changes.

Thanks,
kind regards.


Sorry guy, I guess I’m a bit confused or something. It does work by itself and the css is automatically recognized without any special code. I’m not sure why it failed before, I’ve rewritten the code so I can’t tell, but I guess there was somewhere an error while declaring the class.

Anyway: while using correctly classes in css and html this is not a problem and it just works.

  • 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-14T00:24:49+00:00Added an answer on June 14, 2026 at 12:24 am

    While adding classes could fix it. There’s something odd.

    You said that when you update it via javascript you lose the style. It doesn’t make sense.

    The only way you could destroy the styling would be, altering the dom (so the new cart is different to the old according to the rule that styles it) or the old cart was inline styled and you cleaned its styles.

    If it’s inline css you could save the inline style document.getElementById(“cart”).style.cssText and apply it to the new cart.

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

Sidebar

Related Questions

I have an asp based shopping cart that uses html based templates to display
I have a query on the db of a shopping cart that involves a
I have a cart table which has a relation to a product table that
I have a ListView that displays a shopping cart. It was working fine until
I have an Action that basically adds an item to a cart, the only
I have function getCartItems in cart.js and I want to call that function in
i have a variable $cartTotal in cart.php page i want to use that same
I have a rails app (rails 3.1.3) that has a shopping cart model. I
I have a shopping cart that displays product options in a dropdown menu and
Transaction belongs_to Cart and Cart has_many Transactions . I have a Cart view that

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.