Jquery slide and Margin -


i have jquery slide in place slide in error message.

$('form').submit(function(){    var $emptyfields = $();     $('form').find('input').each(function(){if($(this).val() == ""){$emptyfields.push(this)}});     if($emptyfields.length != 0){         $('form').find('input').css("border","");         $("#error").show("slide", { direction: "down" }, 1000);         return false;     }else{         return true;     } }); 

and im centering error message via following css.

  #error {     display: none;     font-size: 14px;     margin-left: auto;     margin-right: auto;     width: 24%;   } 

what happens though slides in applies css. there anyway around ?

you use slidedown() or slidetoggle(), i've had css problems show before, behaves differently.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -