I have a table with some tabular data in it.
Currently I am using the below code to get information from the document rows.html but if I change it from $.get to $.ajax I loose the information from rows.html why?
$.get('rows.html', function(r){ //or $.post, $.ajax etc
$('table.bordered').append(r);
});
$.ajaxrequires atypefield to be populated with something like GET, POST, etc. Since you’re fetching data, it seems like you needtype: 'GET'.$.postwon’t help you and if you really want to use$.ajax, you’ll need to specify the type (again, GET). http://api.jquery.com/jQuery.ajax/EDIT: It appears
$.ajaxwill do a GET by default, but try placing everything in a hash,