$('#thisid').parents('li');
// ^ plural!
Note that if you only want the first element in the ancestry, you should use
closest()
:
$('#thisid').closest('li');
// `closest()` is equivalent to (but performs better than)
$('#thisid').parents('li').eq(0);
$('#thisid').parents('li').first();