Events in Floating Action Button Control

31 Oct 20221 minute to read

This section explains the available events in Floating Action Button Control.

Created

Event triggers after the creation of Floating Action Button.

@using Syncfusion.EJ2.Buttons

<ejs-fab id="fab" iconCss="e-icons e-edit" content="Edit" created="createdEvent()"></ejs-fab>

<script>

    function createdEvent(){
        // Your required action here
    }

</script>

OnClick

Event triggers when the Floating Action Button is clicked. Below example shows the Click event of the Floating Action Button.

@using Syncfusion.EJ2.Buttons

<ejs-fab id="fab" iconCss="e-icons e-edit" content="Edit" onclick="EventClick()"></ejs-fab>

<script>
    function EventClick(){
        alert("Edit is clicked!");
    }
</script>