function formCheck(forma) { check = true; $('.mandatory').each(function(){ if ($(this).val()=="") { $(this).parent().addClass('rdeca'); check = false; } else { $(this).parent().removeClass('rdeca'); } }); return check; } function userUpdate() { dataString = "&test=1"; $.ajax({ type: "POST", url: "script/userCount.php", data: dataString, success: function(html){ $('#dlCnt').html(html); Cufon.replace('.downloads', { }); } }); } /* $(document).ready(function() { window.setInterval(function() { userUpdate(); }, 30000); userUpdate(); }); */