Skip to content

Instantly share code, notes, and snippets.

@premchandpl
Created June 13, 2014 22:28
Show Gist options
  • Select an option

  • Save premchandpl/3e912523807c211bc156 to your computer and use it in GitHub Desktop.

Select an option

Save premchandpl/3e912523807c211bc156 to your computer and use it in GitHub Desktop.
Get version data
var $div = $('<div>');
$div.load('Site collection path/Lists/ListName/DispForm.aspx?ID=265&VersionNo=1024 table.ms-formtable', function(){
var table = $(this).find('table.ms-formtable');
var tr = $(table).find('tr');
$(tr).each(function(){
var row = $(this);
var columnName = $.trim(row.find('td:eq(0)').text());
var columnValue = $.trim(row.find('td:eq(1)').text());
console.log(columnName);
console.log(columnValue);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment