github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/public/root/js/matrix.interface.js (about) 1 2 $(document).ready(function(){ 3 4 // === jQuery Peity === // 5 $.fn.peity.defaults.line = { 6 strokeWidth: 1, 7 delimeter: ",", 8 height: 24, 9 max: null, 10 min: 0, 11 width: 50 12 }; 13 $.fn.peity.defaults.bar = { 14 delimeter: ",", 15 height: 24, 16 max: null, 17 min: 0, 18 width: 50 19 }; 20 $(".peity_line_good span").peity("line", { 21 colour: "#B1FFA9", 22 strokeColour: "#459D1C" 23 }); 24 $(".peity_line_bad span").peity("line", { 25 colour: "#FFC4C7", 26 strokeColour: "#BA1E20" 27 }); 28 $(".peity_line_neutral span").peity("line", { 29 colour: "#CCCCCC", 30 strokeColour: "#757575" 31 }); 32 $(".peity_bar_good span").peity("bar", { 33 colour: "#459D1C" 34 }); 35 $(".peity_bar_bad span").peity("bar", { 36 colour: "#BA1E20" 37 }); 38 $(".peity_bar_neutral span").peity("bar", { 39 colour: "#757575" 40 }); 41 42 // === jQeury Gritter, a growl-like notifications === // 43 /* 44 $.gritter.add({ 45 title: 'Important Unread messages', 46 text: 'You have 12 unread messages.', 47 image: 'img/demo/envelope.png', 48 sticky: false 49 }); 50 */ 51 $('#gritter-notify .normal').click(function(){ 52 $.gritter.add({ 53 title: 'Normal notification', 54 text: 'This is a normal notification', 55 sticky: false 56 }); 57 }); 58 59 $('#gritter-notify .sticky').click(function(){ 60 $.gritter.add({ 61 title: 'Sticky notification', 62 text: 'This is a sticky notification', 63 sticky: true 64 }); 65 }); 66 67 $('#gritter-notify .image').click(function(){ 68 var imgsrc = $(this).attr('data-image'); 69 $.gritter.add({ 70 title: 'Important Unread messages', 71 text: 'You have 12 unread messages.', 72 image: imgsrc, 73 sticky: false 74 }); 75 }); 76 });