a nice member here helped me set up a multiple checkbox example that stores the data to be shown in a div. However, when I try to do multiple of these, they interlap with each other and show the same data in the divs even when I changed variables.
I set up a simple example here:
http://jsfiddle.net/pufamuf/vrpMc/4/
Thank you for your time everyone 🙂
That’s because you’re using the same selector in both event handlers:
input[type="checkbox"]:checkedThis will select all checked checkbox inputs in the page.
You should instead use
input[name="car[]"]:checkedandinput[name="phone[]"]:checkedto select only the inputs with the given name, each time.