Elderjs / template

Elder.js template project. It is part template, part tutorial. Dive in!
https://elderjs.pages.dev/
MIT License
113 stars 32 forks source link

Buttons are not clickable #54

Open jannaelghabaty opened 1 year ago

jannaelghabaty commented 1 year ago

I am trying to add a simple button using svelte as shown below. The button appears but is not clickable and appears to have no event listeners attached to it. I am having this problem with any event listener in the whole template project except the links since we explicitly specify the href link. Is there a step I am missing to get it to work?

example code in the "Home.svelte" file

<script>
    function handleClick() {
        alert('clicked')
    }
</script>

<button on:click={handleClick}>Click me </button>

Screenshot 2023-03-09 at 4 49 00 PM

I am a newbie so your help would be so much appreciated, thank you :)