click event on td not working
<p>I have an HTML table. In the <code>td</code> tag there is a checkbox. If I click on that checkbox then it gets checked or unchecked as usual. But what I want is that If I click anywhere on that specific <code>td</code> then the checkbox will also get checked or unchecked. Its because if there are a lot of rows and checkboxes there then you might find it hard to exactly put your mouse pointer over the checkbox and press a click (checkboxes are small so finding it difficult is normal). So I want it to be easy for my client, if he press a click outside the checkbox but inside the parent <code>td</code> tag then it will also work.  </p>

<p>My JQuery code is working very good. Now if I click outside the checkbox then its click event is triggered. But the problem is now If I click exactly on the checkbox then it is not working. I am giving my code below. Here is also a <a href="https://jsfiddle.net/sv1b02kd/3/" rel="nofollow"><code>jsfiddle link of my code</code></a>.</p>

<pre><code>&lt;div class='modal-inner-content'&gt;
  &lt;table style="border: 1px solid black;"&gt;
    &lt;tr&gt;
        &lt;td class='check'&gt;&lt;input type='checkbox'/&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;  
</code></pre>

<p>My JQuery code:</p>

<pre><code>$('.modal-inner-content').on('click', 'td', function(){
  var checked = $(this).find(':checkbox').is(':checked');
    $(this).find(':checkbox').prop('checked', !checked);
});  
</code></pre>

<p><strong>UPDATE</strong><br>
Now the jsfiddle code will work, i forgot to include the library. Now see there, if you click outside the checkbox then its working but if you click exactly on the checkbox then its not working. any help?</p>