Skip to content

Buttons are not clickable #54

@jannaelghabaty

Description

@jannaelghabaty

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions