How to open (show) .mini-cart-content box running a jquery command

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10033553
    iorien
    Participant

    Hi,

    How could I open (show) the .mini-cart-content box running a jquery command (e.g: clicking a link, on page load, …) and close (hide) it after a few seconds?

    Thank you very much,


    #10033555
    Support
    Keymaster

    Hello, first thanks for your purchase.

    This is possible with some custom code. Please follow the steps below:

    1) First add this code in (css/custom.css):

    .custom-mini-cart-show {
        visibility: visible !important;
        opacity: 1 !important;
        transform: translate3d(0,0,0) !important;
    }

    2) Add this code in (js/custom.js):

    $(window).on('load', function(){
    	var $miniCartContent = $('.mini-cart-content');
    
    	$miniCartContent.addClass('custom-mini-cart-show');
    
    	setTimeout(function(){
    		$miniCartContent.removeClass('custom-mini-cart-show');					
    	}, 2000); // 2 seconds
    
    });

    * The mini cart will show on page load and then close after 2 seconds.

    Please try that and let us know if you need further assistance.

    Kind Regards,

    Rodrigo.


    If you are satisfied with EZY HTML and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads


Viewing 2 posts - 1 through 2 (of 2 total)

This topic is marked as "RESOLVED" and can not rceive new replies.