$('.example tbody').on('click', 'tr', function (){
var id = this.id;
var index = $.inArray(id, selected);
if (index === -1)
{
selected.push(id);
} else
{
selected.splice(index, 1);
}
$(this).toggleClass('selected');
});
$('#btn').click(function (){
var dataArr = [];
var rowCount = table.rows('.selected').data().length;
alert(rowCount);
});
$('.example tbody').on('click', 'tr', function