Open jQuery Accordion with link

Open jQuery Accordion with link

Hi there,

I have inserted this jQuery accordion on my website:
  1. //accordion
  2. jQuery(document).ready(function() {
  3.     function close_accordion_section() {
  4.         jQuery('.accordion .accordion-section-title').removeClass('active');
  5.         jQuery('.accordion .accordion-section-content').slideUp(300).removeClass('open');
  6.     }

  7.     jQuery('.accordion-section-title').click(function(e) {
  8.         // Grab current anchor value
  9.         var currentAttrValue = jQuery(this).attr('href');

  10.         if(jQuery(e.target).is('.active')) {
  11.             close_accordion_section();
  12.         }else {
  13.             close_accordion_section();

  14.             // Add active class to section title
  15.             jQuery(this).addClass('active');
  16.             // Open up the hidden content panel
  17.             jQuery('.accordion ' + currentAttrValue).slideDown(300).addClass('open'); 
  18.         }

  19.         e.preventDefault();
  20.     });
  21.     $('.text_slider').text_slider(DETECTION.phone);
  22. });
This is the html:
  1. <div class="accordion soft_clear">
  2. <div class="accordion-section">
  3. <a class="accordion-section-title" href="#accordion-1"><span>HEADLINE</span></a>
  4. <div id="accordion-1" class="accordion-section-content">
  5. <p>
  6. TEXT HERE
  7. </p>
  8. </div>
  9. </div>
  10. </div>
However I'd like to have an accordion section open when I insert a link like this:
www.website.com#accordion-5

Do you have a solution for that?

Please bare with me - I have found several threads for that regarding the same issue but I couldn't figure it out though :(

Thanks a million!