Close active Bootstrap 5 Tab on click

تبليغ
سؤال

يرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.

تبليغ
‎إلغاء

This question has been asked for Bootstrap 4 and lower but not for Bootstrap 5 I think. For Bootstrap 4 I used some Jquery like this https://www.codeply.com/go/bp/61835

When an active tab gets clicked, the ‘active’ class should be removed from the tab button and the tab pane should be hidden.

Does someone has a simple solution for that? I cannot get it to work without calling preventDefault() for the Bootstrap events (‘show’, etc) and doing everything manually.

Thanks!

‫أضف إجابة

تصفح
تصفح

مجهول يجيب