Skip to content

Instantly share code, notes, and snippets.

@taleeb35
Created January 6, 2015 13:22
Show Gist options
  • Save taleeb35/d6e9a44d4650c2c0f448 to your computer and use it in GitHub Desktop.
Save taleeb35/d6e9a44d4650c2c0f448 to your computer and use it in GitHub Desktop.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
var count = 0;
var value = $('#cart').text();
//console.log(value);
$(".checkbox").click(function(){
var counts = $("[type='checkbox']:checked").length;
if(counts > 0){
$('#cart').html(value + '(' + counts +')');
$('#test').click(function() {
$('#test').text('');
var selectedLanguage = new Array();
$('#record tr').has(':checkbox:checked').find('td:eq(0),td:eq(1),td:eq(2),td:eq(3),td:eq(4)')
.each(function(){
selectedLanguage.push($(this).text());
//$('#test').append($(this).text());
});
alert(selectedLanguage);
});
} else {
$('#cart').html(value);
}
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment