Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
Mouse wheel scroll not recognizing jQuery slideToggle()

I am using jQuery slideToggle() to expand elements in a list, but when I scroll down the page with my mouse wheel, the down arrow key, or the page down key, the page stops where the page would normally end without the element being expanded. I can continue scrolling with the scroll bar, though. Here is my script:

<style>
.expand-arrow-link {
    padding: 14px;
    line-height: 1;
    background: none;
    border: 0;
    text-decoration: none;
}
.expand-arrow-link:hover {
    text-decoration: none !important;
}
.expand-arrow-link .x-icon {
    padding-bottom: 0rem !important;
}
.flip-arrow-up {
    transform: scaleY(-1);
    transition: 0.6s;
}
.flip-arrow-down {
    transform: none;
    transition: 0.6s;
}
#element_id_to_expand {
    display: none;
}
</style>
<script>
jQuery(document).ready(function() {
    var link = jQuery("#element_id_to_click");
    var expand = jQuery("#element_id_to_expand");

    // Add classes by default
    link.addClass("flip-arrow-down").addClass("expand-arrow-link").attr("aria-expanded", "false").attr("value", "expand");

    // Toggle jQuery
    link.click(function() { 
        expand.slideToggle();
        if (link.attr("aria-expanded") == "false") {
            link.addClass("flip-arrow-up").removeClass("flip-arrow-down").attr("aria-expanded", "true");
        } else {
            link.addClass("flip-arrow-down").removeClass("flip-arrow-up").attr("aria-expanded", "false");
        }                
    });
}); 

How do I get it to continue scrolling to the end of the page?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!