Href not working with jquery.js script


Topic: Href not working with jquery.js script

Neltarim asked 2 years ago

Hi !

Recently i tried the pro jquery version of MDB, but after several hours of working on my personnal project, i realised that all the links to another page wasn't working ...

After some tests, i found that jquery.min.js was the problem. When i delete it from my html file, the smooth scroll isn't working anymore but all the buttons with a href to another page (href="html/exemple.html") are working fine. (it doesn't involve href to sections inside the file (href="#section")).

And i'm worryied that i'm the only one on the forum who got this issue ! So am i doing something wrong ?


Krzysztof Wilk staff answered 2 years ago

Hi!

Thanks for reporting this bug. The smooth scroll is made mainly for scrolling between sections, but it also should allow moving a user at another, outer page. I added task for it and we'll fix it as soon as possible :)

Best regards


Neltarim answered 2 years ago

I found a temporary solution with a Django trick.

For thoses who have the same issue and work with Django, I've just delete the href from the anchor and add

onclick="location.href = '/another_page/' "

This is working well in developpement but i'm not sure if it's effective in production. (sorry for my english, i'm french :) )

Side note: the smooth scroll and others jquery script work as well with this solution.


Krzysztof Wilk staff commented 2 years ago

Thanks for the temporary solution!

I think that this trick will also work without Django, on plain JavaScript :)

Best regards


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.19.1
  • Device: laptop
  • Browser: Chrome
  • OS: Windows and linux
  • Provided sample code: No
  • Provided link: No