Jquery problem AddToBasketButton_Click

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
William_firefold
Commander (CMDR)
Commander (CMDR)
Posts: 186
Joined: Fri Aug 01, 2008 8:38 am

Jquery problem AddToBasketButton_Click

Post by William_firefold » Thu Nov 12, 2009 1:05 pm

I am trying to remove the right sidebar altogether and make a jquery drop down box containing the stuff from the minicart and shipping estimator.
The problem is that I want the minicart to pop down whenever the Add To Cart button is pressed, and im not sure I know how to do it right.
My new minicart is a box with a red X in the corner. If you click the link in the header ".tab" it will pop down, and if you click the X, it goes away.

Code: Select all

            $(document).ready(function(){
                $(".button").click(function(){
                    if ($(".dev").is(":hidden")){
                        $(".dev").slideDown("fast");
                    }
                    else{
                        $(".dev").slideUp("fast");
                    }
                });
                $("#xclose").click(function(){
                    $(".dev").slideUp("fast");
                });
            });
I can make it pop down the first time the addtocart button is pressed, but if you hide the box, any additional clicks on addtocart do not make the box appear.
Does anyone have any advice?

Post Reply