I have links inside a list item that toggles on click, but when I click on the link the toggleclass activates and it disappears.
<script type="text/javascript">
$(document).ready(function() {
$(".content-list > li").live("click", function () {
$(this).find('.links').toggleClass("hide");
});
});
</script>
http://jsfiddle.net/davemj88/DtrDw/1/
If you click on any link inside the list item it toggles and goes away. I want it to remain visible unless you click on the background or not a link.
I want the list item to toggle UNLESS a user clicks on a link somewhere inside, then I DON'T want it to toggle the class. How do I restrict the toggleclass to only working when a user doesn't click on another link inside?