function preloadImage(url, callback) { var img = new Image(); $(img).load(callback).attr('src', url); } // Needed for back browse actions to call document.ready history.navigationMode = 'compatible'; $(document).ready(function() { $("#logout").click(function() {$("#logoutform").submit();}); $("p.notice span").click(function() { // Whenever someone clicks the litte X on the notice message do the following $('p.notice').slideUp('slow'); // Fade out the whole paragraph $('p.notice span').hide('fast'); // And hide the X }); $("p.info span").click(function() { $('p.info').slideUp('slow'); $('p.info span').hide('fast'); }); $("p.success span").click(function() { $('p.success').slideUp('slow'); $('p.success span').hide('fast'); }); $("p.error span").click(function() { $('p.error').slideUp('slow'); $('p.error span').hide('fast'); }); $("p.todoitem a.close").click(function() { // Whenever someone clicks on a the X in a To-do item do this: $(this).hide('fast'); // Hide the X - FAST! $(this).parent().slideUp('slow'); // Slide Up the to-do item. }); $(".html_text").cleditor({ width: 920, // width not including margins, borders or padding height: 250, // height not including margins, borders or padding controls: // controls to add to the toolbar "bold italic underline strikethrough | " + " link unlink | " + " undo redo ", useCSS: false, // use CSS to style HTML when possible (not supported in ie) }); $('.input_date').datepicker(); // $('#added' ).datepicker( "option", "dateFormat", 'yy-mm-dd' ); oTable = $('.data1').dataTable({ "bJQueryUI": true, "sPaginationType": "full_numbers" }); });