notifIt!

Notify what you want! Quick&Easy

Step 1 - Try it! (Click the codes to preview) #done

notif({
  msg: "<b>Success:</b> In 5 seconds i'll be gone",
  type: "success"
});
notif({
  msg: "<b>Oops!</b> A wild error appeared!",
  type: "error",
  position: "center"
});
notif({
  type: "warning",
  msg: "<b>Warning:</b> Be patient my friend.",
  position: "left"
});
notif({
  type: "info",
  msg: "<b>Info:</b> Some info here.",
  width: "all",
  height: 100,
  position: "center"
});
notif({
  type: "error",
  msg: "This error will stay here until you click it.",
  position: "center",
  width: 500,
  height: 60,
  autohide: false
});
notif({
  type: "warning",
  msg: "Opacity is cool!",
  position: "center",
  opacity: 0.8
});
notif({
  type: "info",
  msg: "Testing a multiline text. Testing, one, two.. yep.",
  position: "center",
  width: 100,
  autohide: false,
  multiline: true
});
notif({
  type: "success",
  msg: "Fade mode activated.",
  position: "right",
  fade: true
});
notif({
  msg: "Customize with your favourite color!",
  position: "left",
  bgcolor: "#294447",
  color: "#F19C65"
});
notif({
  msg: "Customize the timeout!",
  position: "left",
  timeout: 1000
});
notif({
  type: "info",
  msg: "Look! I have a button!",
  position: "center",
  clickable: true
});

Step 2 - Download it!

Now!

Step 3 - Plug

// Include this in the <head>
<script type="text/javascript" src="js/notifIt.js">
<link rel="stylesheet" type="text/css" href="css/notifIt.css">

Step 4 - & play #first

notif({
	msg: "<b>Oops!</b> A wild error appeared!",
	type: "error",
	position: "center"
});

There's more! notif_confirm

var myCallback = function(choice){
	if(choice){
		notif({
			'type': 'success',
			'msg': 'Awesome!',
			'position': 'center'
		})
	}else(choice){
		notif({
			'type': 'error',
			'msg': 'ow.. :(',
			'position': 'center'
		})
	}
}

notif_confirm({
	'message': 'Do you like it?'
	'textaccept': 'Yes!',
	'textcancel': 'No',
	'callback': myCallback
})
			
var myCallback = function(choice){
	if(choice){
		notif({
			'type': 'success',
			'msg': 'Awesome!',
			'position': 'center'
		})
	}else(choice){
		notif({
			'type': 'error',
			'msg': 'ow.. :(',
			'position': 'center'
		})
	}
}

notif_confirm({
	'message': 'Fullscreen better?'
	'textaccept': 'Yes!',
	'textcancel': 'No',
	'fullscreen': true,
	'callback': myCallback
})
			

Even more! notif_prompt

var myCallback = function(text){
	if(text !== false){
		notif({
			'type': 'success',
			'msg': 'Your pet name is: ' + text
		})
	}else(text){
		notif({
			'type': 'error',
			'msg': 'You cancelled :('
		})
	}
}

notif_prompt({
	'message': "What's your pet's name?"
	'textaccept': "That's it!",
	'textcancel': "I don't have a pet :("
	'callback': myCallback
})