Skip to content

Flashes messages by baramex

Compare
Choose a tag to compare
@baramex baramex released this 25 Aug 14:44
· 19 commits to main since this release
811b849

Requirements

Installation

  • Download the script (and style) and use it in local OR use CDN

Create Flash

  • function: createFlash(type, message, time?)
  • types:
    • success-flash
    • error-flash
    • info-flash
    • not-allowed-flash
  • message: string
  • time: the default is 2500 ms, 0 is infinite
  • exemple: createFlash("success-flash", "You understood!", 0)

CDN

<link rel="stylesheet" href="http://baramex.fr:9999/cdn/flashes-messages/flashs.css">
<script src="http://baramex.fr:9999/cdn/flashes-messages/flashs.js"></script>

Exemple

Head:

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

<link rel="stylesheet" href="http://baramex.fr:9999/cdn/flashes-messages/flashs.css">
<script src="http://baramex.fr:9999/cdn/flashes-messages/flashs.js"></script>

Body:

<body onload="createFlash('info-flash', 'loaded!');">
  
</body>