Created
January 6, 2015 13:22
-
-
Save taleeb35/d6e9a44d4650c2c0f448 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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