I try to update the content of a div with ajax and jquery and it does not work.What is the error?
Code:
<div class="video7" id="video7">
 0 <a id="like7" onclick="return statuslike('7','/testdrive/control/videoslike','video7')"
 href="#"> like </a></div>
Code:
function  statuslike(id,url,div)
{    var options = {
        type: 'POST',
        url:url,
        data: 'cid='+id,
        success: function (data, textStatus, jqXHR)
        {
        $('#'+div).replaceWith(data);
        }     }   
    $.ajax(options);
    return false;        
       
}