MediaWiki:Common.js: Difference between revisions
Content deleted Content added
No edit summary |
No edit summary |
||
Line 329:
$('body').append(emailBtn);
}
});
/* Open AXA BRAIN AI Assistant when clicking the logo */
$(document).ready(function() {
// When an image with the 'chatbox-trigger' class is clicked...
$('.chatbox-trigger').click(function(e) {
e.preventDefault(); // Stop normal clicking behavior
// Find the AI Assistant button by looking for its unique icon from your HTML source
var $aiButton = $('img[src*="ai-icon.png"]').closest('div, button, a');
// If the button exists on the page, simulate a click to open it
if ($aiButton.length > 0) {
$aiButton.trigger('click');
} else {
console.log("AXA BRAIN Assistant button not found on this page.");
}
});
});
| |||