-
I was going though the docs for the navigation module and got a menu created and working with no issues. On page click events I usually have a function to close the nav menu if running from a mobile device. I tried to make a function and do:
But when I run it, it does not go to the target page. It only runs the "on_click" function. What is the proper syntax or example to have both target and onclick event working? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I was able to get around by having putting the mobile check on the target page itself when it loads, but it would great to know how to use on_click along with a target. |
Beta Was this translation helpful? Give feedback.
-
The default behaviour when a link is clicked is defined by the _default_link_click function. If you provide a different function via the |
Beta Was this translation helpful? Give feedback.
The default behaviour when a link is clicked is defined by the _default_link_click function.
If you provide a different function via the
on_click
argument, it's up to you do define its behaviour. If you want it to open a form via thetarget
argument, you need to include code to do that.