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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:43:42+00:00 2026-05-27T09:43:42+00:00

I am almost finished my recent project apart from one issue. I have a

  • 0

I am almost finished my recent project apart from one issue.

I have a shopping cart which is minimized as standard and position fixed to the top right. When clicked the form is shown which displays the products in the basket. When clicked again it is minimized. Pretty standard stuff. Here is the code for the toggle effect:

  $('.widget #close').toggle(function() {
        $(".widget form").slideDown(400); 
        $('.widget').animate({width: 300}, 400);
        $(this).addClass("mini") 
  }, function() {
        $(this).removeClass("mini") 
        $('.widget').animate({width: 110}, 400);
        $(".widget form").hide(400); 
  });

This works perfectly fine. My problem is: The content which is held within the form which is toggled is dynamically created. By that I mean, when you click to add a product to the basket the name and quantity is added to the form by JavaScript (wordpress plugin). If the form is minimized when you add the product everything works as normal but if you open the cart so it is showing the content, then you add a product so as to update the content shown the whole form disappears (I assume it loses its created width and height). You then have to minimize and maximize again to see the content.

You can see an example of this on the live demo – http://intelligentstudios.co.uk/superior/#products If you add a product, open up the cart top right, everything works. Leave the cart open then add another product and you will see the problem.

Help is greatly appreciated.

One of my thoughts was to add an event to the purchase button which minimizes the cart. This breaks the toggle effect though as you would have to click twice to get the cart to maximize.

  • 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-27T09:43:42+00:00Added an answer on May 27, 2026 at 9:43 am

    I don’t see the code in your JavaScript file that updates the shopping-cart-box but you can trigger clicks on the #close element to close and open the shopping-cart-box which will update the view properly:

    Change:

    $("#products form input[type=submit]").click(function(){
        $(".updated").show().animate({opacity: 1.0}, 1000).fadeOut(500);
    });
    

    To:

    $("#products form input[type=submit]").click(function(){
        $(".updated").show().animate({opacity: 1.0}, 1000).fadeOut(500);
        $('#close').trigger('click');
        setTimeout(function () {
            $('#close').trigger('click');
        }, 500);
    });
    

    To test this you can just add my code to the page via Firebug’s console.

    UPDATE

    So if you look at the shopping-cart-box in FireBug you can see that the form that gets added via AJAX is hidden, so if you add code to show it you should get the expected behavior:

    function load_cart(values){
        $("#wpchkt_widget").load(wpchkt_c_url, values,function(){
            $(".preload_img").hide();
            $("#wpchkt_widget .update_cart").hide();
            buttons_events();                
        });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm almost finished with my program, but I have one problem that I can't
I have an app which is almost finished and the last part is where
i am almost finished with my first android game which i would like to
I am trying to make my own user control and have almost finished it,
i am working on a recipe site (which is almost finished except this problem)
I'm almost finished developing my large project, however I would love it if I
G'day guys, currently have almost finished writing a rails application that allows a CSV
I'm trying to learn Objective-C. I almost finished one excercise but it is not
I'm going through Practical Common Lisp, I'm almost finished, and one question that has
I have almost finished my app for android, the problem is when i test

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.