views:

61

answers:

1

I have a drop down form that submits itself on change without even relying on jquery:

<script type="text/javascript"> 
$("#sortForm").change(function(){
         this.submit();
   });
</script>

But on a certain page (not everywhere) I need it to also load an external page on success, like this:

$('#tread').load('external_page.php #tread').slideDown('slow');

How do I do it? Just in case - I have jquery form plugin.

The slideDown() function here is my second question actually - I have several instanses on my site where I'd like to animate the loading,but nowhere it works. Can animations work with .load() at all? Thanks!

+2  A: 

A couple things.

  1. Are you sure you understand the difference between JavaScript and jQuery? Your first code block is absolutely using jQuery.
  2. Animations can work with .load(), but you need to use a 2nd parameter so that it is called on completion. There's more info on the api page.
rchern