scrollspy callback


Topic: scrollspy callback

tattoodxb asked 6 years ago

how to callback when scrollspy is triggered? as on bootstrap there is a callback however it doesn't work inside mdb.
https://v4-alpha.getbootstrap.com/components/scrollspy/

i tried:
$(window).on('activate.bs.scrollspy', function (event) {
alert("test");
});

but it doesn't work

Please don't tell me again that this is a know issue and you guys will look into this in the future


tattoodxb commented 6 years ago

also tried https://mdbootstrap.com/docs/jquery/navigation/scrollspy/
since i have included jquery in our angular app

$("#section1").on('activate.bs.scrollspy', function () {
console.log("activate");
});

but still no luck

Damian Gemza staff answered 6 years ago

Dear @tattoodxb 

We are not using the Bootstrap scrollspy. We have implemented our scrollspy in MDB Angular.

And unfortunately, it doesn't have a callback or @Output() event. We have to add this functionality.

PS: In the Angular project, it's a very bad idea to use jQuery. Only Angular should be able to modify DOM elements, so jQuery is not necessary to use in your project.

PS2: ScrollSpy is MDB jQuery Pro component, so It would be strange if jQuery scrollspy would work in MDB Angular project.

Best Regards,

Damian


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 Angular
  • MDB Version: 6.2.3
  • Device: mac
  • Browser: chrome
  • OS: mojave
  • Provided sample code: No
  • Provided link: No
Tags