In the .js script below, the ajaxPath reference breaks when the containing page is off the root directory of the site. Is there a workaround to make this path absolute?
jQuery(document).ready(function($){
initContentEditable();
var dir = ContentEditableSettings.content_editable_url;
var ajaxPath = 'wp-admin/admin-ajax.php'; //THIS RELATIVE PATH BREAKS OUTSIDE ROOT DIRECTORY
function initContentEditable(){
$('.contenteditable.furniture').blur(updateContentEditable);
$('.contenteditable.custom').blur(updateContentEditableCustom);
$('.contenteditable.title').blur(updateContentEditableTitle);
$('.contenteditable').each(function(){
var parent = $(this).parent();
var display = parent.css('display');
$(this).css('display', display);
});
}
function updateContentEditableTitle(e){
e.preventDefault();
var span = $(this);
var data = new Object();
data.pid = span.attr('data-pid');
data.title = span.find('.saver').text();
data.action = 'ce_update_title';
data.security = ContentEditableSettings.nonce;
$.post(ajaxPath, data, onContentSaved); //AJAXPATH BREAKS AS RELATIVE REF
}