$('#button').click(function () { var txt= $("#txt_box1").val(); if (txt== "") { $("#txt").css({ 'border': '1px solid #f2d3ce' }); //div ID error_msg $("#error_msg").show(slow); hidemeplease(); } }); function hidemeplease(){ //how to write the code for hiding the div after 5sec. }
setTimeout(function() { $div2.hide(); }, 5000);
$(document).ready(function(){ setTimeout(function(){ $("#popupBox").fadeOut("slow") //#popupBox is the DIV to fade out }, 5000); //5000 equals 5 seconds });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)