I have the following code in my view.
<script>
function show_alert() {
alert()
}
</script>
<a href="#" data-turbo="false" onclick="show_alert()">Alert a</a>
<p onclick="show_alert()">Alert p</p>
My p tag works, but not the link which errors in the console with "show_alert is not a function". I know that Turbo intercepts links and forms, but I was expecting data-turbo="false"
to disable it.
I'm gradually learning Turbo, so I do not want to completely disable it.
tag will create a alert box. The whole approach with inline scripts and attributes is a dead end though.
– max Apr 15 '23 at 11:08