How can I call "event.preventDefault" on the "a" tag within the ".ul li"?
<p>In my code block below, I want to call <code>event.preventDefault</code> on the <code>a</code> tag within the <code>.ul li</code>, so that on click of any list element, the <code>a</code> tag should not redirect to the page in its <code>href</code> attribute. I tried by doing <code>$this.find("a").preventDefault();</code> but that results in an error. How would I go about doing this? </p>

<pre><code>$(document).ready(function () {
    $(".ul li").on("click", function () {
        var $this = $(this);
        $this.find("a").preventDefault();

        // switch all lists off 
        $(".selectedList, .checkedList").removeClass("selectedList, checkedList");
        // switch this list on  
        $this.addClass("selectedList, checkedList");
    });
});
</code></pre>
