Update tests and documentation.

This commit is contained in:
Diana Huang
2013-03-06 14:53:13 -05:00
parent 1aa3580dcb
commit 42e711e7d2
3 changed files with 27 additions and 9 deletions

View File

@@ -13,7 +13,9 @@
prev_id = "#" + this.id + "_preview";
preview_div = $(prev_id);
url = $(this).parents('.problems-wrapper').data('url');
// find the closest parent problems-wrapper and use that url
url = $(this).closest('.problems-wrapper').data('url');
// grab the input id from the input
input_id = $(this).data('input-id')
Problem.inputAjax(url, input_id, 'preview_chemcalc', {"formula" : this.value}, create_handler(preview_div));