I have a handle the following element as this:
<ul class="blog-tags"> <li> demand <i class="fa fa-close"></i> </li> </ul> this.closest('li')
returns a reference to the closest li element. but
this.closest('ul')
returns null. I also tried
$(this).closest('ul')
which also returns null. I also tried by class name:
$(this).closest('.blog-tags')
but I'm still not getting a handle to the element. Any idea what might be wrong here?