Support » Plugin: Page scroll to id » js used for making entire div clickable

  • Hi I’m using custom js to make an entire div clickable, and smooth scroll is no longer occurring. Is there something I should add to the script to re-enable smooth scrolling?


    jQuery(function($) {
    $(‘#MY_SECTION_ID’).click(function() {
    window.location.href = ‘#NEXT_DIV’;

Viewing 1 replies (of 1 total)
  • Plugin Author malihu



    The plugin works out-of-the-box only on link (anchor) elements (<a />) with a valid href attribute.

    If you want to make the div scroll smoothly to an id (when clicked), you should use plugin’s scrollTo method in your script. For example:

    $("#MY_SECTION_ID").click(function(e) {

    The method provides few options like special offset, clicked element etc. (more info).

    • This reply was modified 1 year, 3 months ago by  malihu.
Viewing 1 replies (of 1 total)
  • The topic ‘js used for making entire div clickable’ is closed to new replies.