WordPress.org

Ready to get started?Download WordPress

Forums

Usernoise modal feedback / contact form
[resolved] Feedback Button Interfering w/ My Site (5 posts)

  1. Adam
    Member
    Posted 1 year ago #

    Basically what happens when the "Feedback" button is clicked, my page scrolls to the very bottom. This is caused by some JS I run in my site. If the href would be set to javascript:void(0); instead of #, the scrolling wouldn't occur. I have changed this in the JS file /plugins/usernoise/js/button.js and the scrolling has stopped. Could you please make a note of this on the next upgrade? Thanks! Love the plugin!

    http://wordpress.org/extend/plugins/usernoise/

  2. karevn
    Member
    Posted 1 year ago #

    Adam, currently, when a click on the button is handled, event.preventDefault() is called at the handler, and false is returned - so the code makes everything possible to prevent further event propagation. Adding an inline Javascript to the button HTML code is not a good practice.

    I think it would be best in your case to look at the javascript you have at your site and find an issue there. Feel free to contact me if you need help.

    Thanks!

  3. Adam
    Member
    Posted 1 year ago #

    Hi karevn,

    Thanks for your response! I'm not a JS programmer, so I'd be interested in how you could help. Here's a link to the site where I got the original JS from. I haven't modified it where I am using it in my site, so this code is good to "debug". There is a working example in the following ZIP file.

    http://www.dezinerfolio.com/system/files/df_smooth_scroll.zip

    Thank you very much!

  4. karevn
    Member
    Posted 1 year ago #

    Obviously, the problem is in that plugin - it does not handle click events right. So I recommend to switch to something more contemporary - this one is 5 years old.

  5. Adam
    Member
    Posted 1 year ago #

    You're probably right. I've had issues with this plugin interfering with other jQuery plugins (because of the click event). I'll do a Google search, but do you have a good recommendation that you can think of "off the top of your head"? Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.