Fixed nested tab elements li activation

Added closest li instead of direct parent so that you can nest multiple elements within tabs, such as button groups