notify.js 620 B

12345678910111213141516171819202122232425262728293031323334
  1. PNotify.prototype.options.styling = "bootstrap3";
  2. $(document).ready(function(){
  3. });
  4. function notify(type,msg){
  5. var title = type.toLowerCase().replace(/\b[a-z]/g, function(letter) {
  6. return letter.toUpperCase();
  7. });
  8. var icon = '';
  9. if(type == 'success'){
  10. icon = 'font-icon font-icon-check-circle';
  11. }else{
  12. icon = 'font-icon font-icon-warning';
  13. }
  14. new PNotify({
  15. title: title,
  16. text: msg,
  17. type: type,
  18. icon: icon,
  19. addclass: 'alert-with-icon'
  20. });
  21. }
  22. function custom_notify(type,icon,title,msg){
  23. new PNotify({
  24. title: title,
  25. type: type,
  26. text: msg,
  27. icon: icon,
  28. addclass: 'alert-with-icon'
  29. });
  30. }