So.. a user clicks a checkbox.. now im stuck!
Im a little stuck on how to accomplish this.
Basically I want to add or remove an element to a bar on the right when a checkbox is checked and unchecked.
This is a shopping cart for a computer builder. So imagine adding and removing parts.
What I got so far is:
-
$('input:checkbox').click(function() {
total = Number($('input#basePrice').attr('value'));
upgradeCost = Number($(this).attr('upgradeCost'));
partId = $(this).attr('partId');
partTitle = $(this).attr('partTitle');
subTypeId = $(this).attr('subTypeId');
subTypeTitle = $(this).attr('subTypeTitle');
partTypeTitle = $(this).attr('partTypeTitle');
});
This basically collects all the attributes for that checkbox element. This will be the content used to update the right sidebar with updated price and item list.
If you have any pointers or ideas how to accomplish this I would love to hear it!