I´m triggering an alert by jQuery with Joomla.renderMessages. The alert comes up, but won´t close when I press the close button!?

I´m using a custom template, I´ve made from scratch

I´ve search for answers without luck. according to this - https://docs.joomla.org/Display_error_messages_and_notices, it dosen´t seem like I need anything included in the template files, but I have the feeling that I need some javascript to make it work?

Joomla.renderMessages({'success': ['Du kan ikke gemme en tom note']});
  • Are you getting any console log errors?
    – Lodder
    Aug 30 '18 at 8:26
  • @Lodder no, not at all Aug 30 '18 at 8:27
  • Can you share the full code you're using to render the alert in your question please?
    – Lodder
    Aug 30 '18 at 8:28
  • Do I need to include 'media/jui/bootstrap.js' in my template? Aug 30 '18 at 8:28
  • @Lodder I´ve updated the question Aug 30 '18 at 8:29

The alerts derive from Bootstrap, therefore when developing a custom template, you need to make sure you include Bootstrap, and of course, jQuery.

You can do so by adding the following lines to your template's index.php file:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.