Update framework.js

Added prepend option '^' for AJAX framework "data-request-update" parameter
This commit is contained in:
john-mark-wilkinson 2014-06-09 13:47:00 -07:00
parent 296e66fc28
commit 35defa381b
1 changed files with 3 additions and 1 deletions

View File

@ -161,6 +161,8 @@ if (window.jQuery === undefined)
var selector = (options.update[partial]) ? options.update[partial] : partial
if (jQuery.type(selector) == 'string' && selector.charAt(0) == '@') {
$(selector.substring(1)).append(data[partial]).trigger('ajaxUpdate', [context, data, textStatus, jqXHR])
} else if(jQuery.type(selector) == 'string' && selector.charAt(0) == '^'){
$(selector.substring(1)).prepend(data[partial]).trigger('ajaxUpdate', [context, data, textStatus, jqXHR]);
} else
$(selector).html(data[partial]).trigger('ajaxUpdate', [context, data, textStatus, jqXHR])
}
@ -379,4 +381,4 @@ if (window.jQuery === undefined)
$(document).on('render', callback)
}
}(window.jQuery);
}(window.jQuery);