I want to use a custom floating button in my angular 9 project. I have added the custom scripts.js file in angular.json file, below is how the structure looks.
"scripts": [
"src/assets/js/custom/action-panel.js",
"src/assets/js/custom/scripts.js",
]
below is the code in scripts.js file
$(document).ready(function()
{
$('.st-actionContainer').launchBtn( { openDuration: 500, closeDuration: 300 } );
});
below is the code i'm using in the html file
<div class="st-actionContainer right-bottom">
<div class="st-panel">
<div class="st-panel-header"><i class="fa fa-bars" aria-hidden="true"></i> Menu</div>
<div class="st-panel-contents">
Put menu or icon links here!<br /><br />
Or make a grid:
</div>
<div class="grid">
<a href="#" class="gridChild"><i class="fa fa-cubes" aria-hidden="true"></i></a>
<a href="#" class="gridChild"><i class="fa fa-database" aria-hidden="true"></i></a>
<a href="#" class="gridChild"><i class="fa fa-send" aria-hidden="true"></i></a>
<a href="#" class="gridChild"><i class="fa fa-tag" aria-hidden="true"></i></a>
<a href="#" class="gridChild"><i class="fa fa-trophy" aria-hidden="true"></i></a>
<a href="#" class="gridChild"><i class="fa fa-user" aria-hidden="true"></i></a>
<a href="#" class="gridChild"><i class="fa fa-file" aria-hidden="true"></i></a>
<a href="#" class="gridChild"><i class="fa fa-table" aria-hidden="true"></i></a>
<a href="#" class="gridChild"><i class="fa fa-eject" aria-hidden="true"></i></a>
</div>
</div>
<div class="st-btn-container right-bottom">
<div class="st-button-main"><i class="fa fa-bars" aria-hidden="true"></i></div>
</div>
Reference of the script file: https://www.jqueryscript.net/menu/Material-style-Floating-Button-Panel-Plugin-For-jQuery-st-action-panel.html
I'm following the above practise. My floating button doesn't respond on click, out of nowhere sometimes the floating button work but rest of the time it doesn't. Could anybody let me know where am i going wrong