How to insert a cart slidetoggle option when cart icon is clicked?

Im trying to work on my Ecommerce website.

I already have a plugin that opens a "Slidein Cart" when a customer adds items to cart.

What I want is to open the sliding cart when someone clicks the cart icon in the top menu . I tried adding code to slide in cart from right to left but it isn't working. Below is my code .


$(".fa fa-shopping-cart").on("click", function() {
$(".xoo-wsc-modal").slideToggle( "slow");


It doesn't work for me. Maybe im missing some start and end function codes to run this. or my css is wrong.

can anyone help me?

1 answer

  • answered 2021-06-19 20:24 Alumno Cabreado

    Possible solution:

    $ is undefined in your site jQuery is the assumed alias of $ but that one didn't work, the cause can be a conflict in libraries, use jQuery instead of $


    jQuery(".fa.fa-shopping-cart").on("click", function() {
    jQuery(".xoo-wsc-modal").slideToggle( "slow");});