// JavaScript Document if(jQuery.fn.qtip) { $.fn.qtip.styles.mystyle = { // Last part is the name of the style width: 400, background: '#fff', color: '#133636', textSize: '14px', textAlign: 'left', fontFamily: 'Arial, Helvetica, sans-serif', border: { width: 7, radius: 10, color: '#999' }, tip: 'bottomLeft', name: 'dark' // Inherit the rest of the attributes from the preset dark style } $.fn.qtip.styles.errstyle = { // Last part is the name of the style width: 200, background: '#fff', color: '#FF0000', textSize: '12px', textAlign: 'left', fontFamily: 'Arial, Helvetica, sans-serif', cursor: 'pointer', border: { width: 7, radius: 10, color: '#F00' }, tip: 'bottomMiddle', name: 'dark' // Inherit the rest of the attributes from the preset dark style } } $(document).ready(function() { $('#loginFormbtn').click(function(){ $('#loginForm').submit(); }); $('#formSubmitButton').click(function(){ $('.formStyle').submit(); }); if(jQuery.fn.qtip) { $('#errorBox a[title]').qtip({ content: { text: false // Use each elements title attribute }, position: { corner: { target: 'topMiddle', tooltip: 'bottomMiddle' } }, style: 'errstyle' // Give it some style }); } });