如何使用视图文件内容更新特定div?

I include some content in php/symfony like this:

<div id='content'>
  <?php include_partial( 'course/content.php', array("param1" => "1", "param2" => "2") ); ?>
</div>

Now I want to update this content again via AJAX using jQuery.

How can I update content div again by calling course/content.php using jQuery on some jQuery event?

Thanks

Look at the .load event or else .get:

$('#content').load('course/content.php');

Or a .get example:

$.get('course/content.php', function (data){
    $('#content').html(data);
});

Use the jquery ajax method... data (call it what you like) is your repsonse from the query

$.ajax({
  type: "POST",
  url: "content/content.php",
  data: myarray,
  success: function(data){
    $('#content').html(data);
  }
});

for more info on various methods, calls etc go to ajax

$.ajax({type : 'POST',url : 'course/content.php', data: {par1:val1, par2: val2},success : function(data){
                                                    $('#content').append(data);
                                                },

});