here in odoo 13 I create a website template. inside this template i added a button. now I want to show a message after clicking this button through js. but in my code its not working please help me regarding this issue.
js code:
odoo.define('spiralworld_agm_webinar.zoom_button', function (require) {
"use strict";
// Wait for the document to be fully loaded
$(document).ready(function () {
// Find the "Join Meeting" button by its ID
var joinMeetingButton = document.getElementById('joinMeetingButton');
if (joinMeetingButton) {
// Add a click event handler to the button
joinMeetingButton.addEventListener('click', function () {
// Display a message in the console
console.log("Button clicked - Join Meeting event handled.");
// You can add more code here to perform additional actions
});
}
});
});
I added this js inside website.asstets_frontend