Recently, I've started working with jQuery and have come across the useful Notyfy jQuery plugin. My goal is to display a notification bar with specific messages based on certain conditions such as success or error.
I'm trying to achieve something like the following code snippet. Can someone help me correct it so that I can effectively integrate this library?
var notyfySuccess = notyfy({text: 'successfully deleted'});
var notyfyError = notyfy({text: 'something's wrong'});
$(document).ready(function(){
if (true){
alert("hello");
notyfySuccess.show('success bar');
}else{
notyfyError.show('error bar');
}
});