Jump to content

Get an UIKIT Alert to diappear after a few seconds.


NorbertH
 Share

Recommended Posts

Hi there

I am using an UIKIT alert box in a frontend template:

<div class="uk-alert-success uk-text-center" uk-alert>
    <a class="uk-alert-close" uk-close></a>
    <h3><?=$Success.$SuccessText?></h3>
</div>

It already has a close button , but i want it to disappear after some seconds even if you don't close it manually.

UIKIT docs seem to say its possible , but i cannot find an example on how its done. 

Thanks in advance !

 

 

 

 

Link to comment
Share on other sites

I'm not a UIKit expert by any means. In fact, you should have posted this question in the "dev talk" thread. This doesn't have anything to do with ProcessWire per se.

I guess you have the most control if you trigger the alert via JS, and setTimeout(). I don't know if you can fine-tune the animation duration. Maybe someone else who uses this framework regularly knows more.

  • Like 1
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...