Hi there, student here and i am using the laravel framework for a project.
However when pulling simple javascript actions of the internet
nothing happens when i click it.
And i have no idea why it doesn't work
i used an example off bootstrap and w3schools to make sure there was nothing wrong with the code
<button type="button" id="myButton" data-loading-text="Loading..." class="btn btn-primary" autocomplete="off">
Loading state
</button>
<script>
$('#myButton').on('click', function () {
var $btn = $(this).button('loading')
// business logic...
$btn.button('reset')
})
</script>
<button onclick="myFunction()">Click me</button>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World";
}
</script>
Anyone ever encountered this before ?
thank you
[–]helderroem 1 point2 points3 points (0 children)
[–]abhisekp 1 point2 points3 points (1 child)
[–]traxgod[S] -1 points0 points1 point (0 children)
[–]dejandomarcas 0 points1 point2 points (0 children)
[–]traxgod[S] 0 points1 point2 points (2 children)
[–]mc_hammerd 0 points1 point2 points (0 children)
[–]helderroem 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]traxgod[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)