1$("#mydiv").load(location.href + " #mydiv");
2
3//this is actualy not so nice but it does the job.
1$(document).ready(function(){
2 $(function(){
3 $('#ideal_form').submit(function(e){
4 e.preventDefault();
5 var form = $(this);
6 var post_url = form.attr('action');
7 var post_data = form.serialize();
8 $('#loader3', form).html('<img src="../../images/ajax-loader.gif" /> Please wait...');
9 $.ajax({
10 type: 'POST',
11 url: post_url,
12 data: post_data,
13 success: function(msg) {
14 $(form).fadeOut(800, function(){
15 form.html(msg).fadeIn().delay(2000);
16
17 });
18 }
19 });
20 });
21 });
22 });
1(function($)
2{
3 $(document).ready(function()
4 {
5 $.ajaxSetup(
6 {
7 cache: false,
8 beforeSend: function() {
9 $('#content').hide();
10 $('#loading').show();
11 },
12 complete: function() {
13 $('#loading').hide();
14 $('#content').show();
15 },
16 success: function() {
17 $('#loading').hide();
18 $('#content').show();
19 }
20 });
21 var $container = $("#content");
22 $container.load("rss-feed-data.php");
23 var refreshId = setInterval(function()
24 {
25 $container.load('rss-feed-data.php');
26 }, 9000);
27 });
28})(jQuery);