سؤال

I have a website on which you can toggle on/off fullscreen.

I have internal links who works with Backbone router to change page. ( the website is a scroller so it changes the pane and the last url part ).

When i change this url via scrolling or clicking on a link, the website goes off fullscreen.

Im staying on the same website, the internal links have a preventDefault.

DO I have to change my <a href> links to something like <li> ? ( And detect the link change via data-attributes ) ?

Thanks

هل كانت مفيدة؟

المحلول

For information, I managed do do what I want : I use this to route every link in my website :

MyRouter.navigate(url, {
                    trigger: true
                });

'MyRouter' is my extended Backbone router.

So when I go fullscreen, I set a boolean flag to true, and when it is set, I dont bind my links to the navigate method, but I directly call the functions needed to show each page. And it works.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top