Okay
  Public Ticket #1499283
Closing accordion items by clicking on minus icon
Closed

Comments

  • Larry McCauley started the conversation

    Hi, I know I mentioned this in a previous ticket, but as it is a separate issue from the one solved I thought for the sake of clarity for those who may search for the same solution later on, I would use a new ticket to ask. 

    I need to close items by clicking on the minus icon as well as by clicking on the plus icon of other items.

    This is to satisfy a very demanding client who has made it clear that this is a deal-breaker for her. No close on clicking on the minus icon, no new accordion. 

    Hoping you can help!

    And my apologies for posting this question twice. As soon as I pressed submit on the old ticket I realised I should have created a separate ticket for this separate problem. 

     

  •  1,194
    Amit replied

    hi Larry McCauley

    please paste the conents of the js file i will send you a new one

  •  1,194
    Amit replied

    i mean the javascript tab 

  • Larry McCauley replied

    Thank you Amit, once again superb reaction times! I will be sure to mention your sterling support on the Envato sales page. 

    From the JS tab as requested:

    jQuery(document).ready(function(){

    jQuery('.uc_elegant_accordion .uc_trigger-{{uc_id}}').click(function(){
    if( jQuery(this).next().is(':hidden') ) {
    jQuery('.uc_elegant_accordion .uc_trigger-{{uc_id}}').removeClass('active').next().slideUp();
    jQuery(this).toggleClass('active').next().slideDown();
    }
    return false;
    });
    });


  •  1,194
    Amit replied

    try this 

    jQuery(document).ready(function(){

    jQuery('.uc_elegant_accordion .uc_trigger-{{uc_id}}').click(function(){
    if( jQuery(this).next().is(':hidden') ) {
    jQuery('.uc_elegant_accordion .uc_trigger-{{uc_id}}').removeClass('active').next().slideUp();
    jQuery(this).toggleClass('active').next().slideDown();

    }else{
              jQuery('.uc_elegant_accordion .uc_trigger-{{uc_id}}').removeClass('active').next().slideUp();
    }   

    return false;
    });
    });


  •  1,194
    Amit replied

    if it doesnt work send me backend access i will take a closer look

  • Larry McCauley replied

    Amit, my dear boy, your code works like a charm. 

    Thank you so much. I am now off to the comments section of your Envato sales page to let everyone know what stellar support you provide. 

  •  1,194
    Amit replied

    thank you !

    if you can click 5 stars here it would be great

    https://codecanyon.net/downloads


  • Larry McCauley replied

    I have added my praise in the comments section and given you five stars. It was a pleasure to do.