Simple Javascript notifications based on GTA San Andreas. Responsive
Add CSS and JS in your code.
<link rel="stylesheet" href="https://j33sus.github.io/gtasa-notification.js/css/gtasa-notification.min.css">
<script src="https://j33sus.github.io/gtasa-notification.js/js/gtasa-notification.min.js"></script>
Method 1: Pass object with params.
let options = {
message: 'hello', // your message
time: 5000, // time in milliseconds
position: 'top left' // position in screen
};
GTASA.notification(options);
GTASA.notification({message: 'Hello!', position: 'top left', time: 5000});
Method 2: Call inline function passing arguments.
GTASA.notification(message, position, time);
GTASA.notification('Hello!', 'top left', 5000);
top left
, top right
, bottom left
, bottom right
let options = {
// ...
enableSound: true, // default
soundUrl: 'yourfile.ext'
};
GTASA.notification(options);
GTASA.notification({enableSound: true, soundUrl: 'yourfile.ext'});