jeudi 18 juin 2015

Checkbox exclusion on DIV click

I have a simple div container, with a formatted <ul><li> inside to display contact information. When you click on the div it will take you to the page to show their profile. This is working fine.

However, is there a way I can make it so that the checkbox is still clickable? At the moment if you click the checkbox it acts as if I've clicked the parent div so will therefore redirect you away from the page. So, I would like it to work as it is, but with the ability to still be able to click on the checkbox

I have the following mock up, CodePen

Kind regards.

PS The window.location doesn't work in the CodePen example (they've disabled page redirects), but that normally works, and would redirect you.




Aucun commentaire:

Enregistrer un commentaire