Can jQuery's fadeIn work without AJAX?

Posted by Thierry Lam on Stack Overflow See other posts from Stack Overflow or by Thierry Lam
Published on 2010-06-02T18:32:56Z Indexed on 2010/06/02 18:33 UTC
Read the original article Hit count: 172

Filed under:

I'm submitting a form, sometimes I have some messages that I want to show to the user. I want those messages to jQuery fadeIn after they click on the submit button. Is it possible to achieve that if the submission doesn't involve any AJAX?

Here's a sample Django/Python code:

# View code
message = 'feedback to user'

# Template
<div id="messages">{{ message }}</div>

The equivalent PHP code of the above might be:

<?php
$message = 'feedback to user';
?>
<div id="messages"><?= $message ?></div>

I want #messages above to fade in after a POST. How can I achieve that?

© Stack Overflow or respective owner

Related posts about jQuery