Using javascript, how can I get the array of values selected in checkboxes used within a smarty html_options. Ive tried $('#selectbox').val() which returns null.
Asked
Active
Viewed 162 times
1 Answers
0
$("#trigger").click(function () {
var selected = $("input:checked");
var values = [];
selected.each(function (i,d) {
values.push(d.value);
});
console.log(values);
});
http://jsfiddle.net/698Ec/ this is a demo

qiu-deqing
- 1,323
- 7
- 13