amitabhaghosh197
9/23/2015 - 2:02 PM

Slide Toggle with cursor change

Slide Toggle with cursor change

$('.spoiler-top').on('click', function(){
        
          $('.spoiler-cont').slideToggle("slow",function(){
            var img_plus = '//cdn.shopify.com/s/files/1/0959/8108/t/3/assets/spoiler-img.png';
            
            var img_minus = '//cdn.shopify.com/s/files/1/0959/8108/t/3/assets/spoiler-img-minus.png';
            if($(this).is(':visible')){
              
              $(this).parent().find('.spoil-click').html('<img src=" ' +  img_minus + '">');
            } else {
            $(this).parent().find('.spoil-click').html('<img src=" ' +  img_plus + '">');
            
            }
            
          
          });
        
        });