coupe-r Posted April 4, 2011 Share Posted April 4, 2011 Hi All, When there is are error messages, I have jQuery slide down a Div. But, when there are multiple errors, it slides down very far but once the slide is over, the page jumps back up to the bottom of the DIV (where it should have stopped sliding in the first place) HTML <!-- ERROR MESSAGE --> <div id="error" style="display:none;"> <table width="40%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="75%" align="center"> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" class="errorBox"> <tr> <td width="18%" align="center" valign="middle"> <strong><font color="black"><img src="../images/general/error_sheild.png" title="Error(s)" alt="Error(s)" width="40" height="40" /></font></strong> </td> <td> <?php foreach($val_error as $value) { echo '<table border="0" cellpadding="2" cellspacing="0">'; echo '<tr>'; echo '<td><img src="../images/general/caution.png" alt="Error" title="Error" width="10" height="10"> <strong>'.print_r($value, 1).'</strong></td>'; echo '</tr>'; echo '</table>'; } ?> </td> </tr> </table> </td> </tr> </table> </div> <!-- END ERROR MESSAGE --> JQuery <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('#error').removeClass().slideDown(2000); }); </script> Quote Link to comment https://forums.phpfreaks.com/topic/232692-jquery-slidedown-goes-too-far-then-back-up/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.