Bootstrap 4 ကျူတိုရီရယ်

BS4 ပင်မစာမျက်နှာ BS4 ကို စတင်လိုက်ပါ။ BS4 ကွန်တိန်နာများ BS4 Grid အခြေခံ BS4 စာစီစာရိုက် BS4 အရောင်များ BS4 ဇယားများ BS4 ရုပ်ပုံများ BS4 Jumbotron BS4 သတိပေးချက်များ BS4 ခလုတ်များ BS4 ခလုတ်အုပ်စုများ BS4 တံဆိပ်များ BS4 တိုးတက်မှုဘားများ BS4 Spinners BS4 Pagination BS4 စာရင်းအုပ်စုများ BS4 ကတ်များ BS4 ဆွဲချမှုများ BS4 ခေါက်သိမ်းပါ။ BS4 ရေတပ် BS4 Navbar BS4 ပုံစံများ BS4 ထည့်သွင်းမှုများ BS4 ထည့်သွင်းမှုအုပ်စုများ BS4 စိတ်ကြိုက်ပုံစံများ BS4 ချားရဟတ် BS4 Modal BS4 Tooltip BS4 Popover BS4 ဆန္ဒပြုခြင်း။ BS4 Scrollspy BS4 အသုံးအဆောင်များ BS4 Flex BS4 သင်္ကေတများ BS4 မီဒီယာအရာဝတ္ထုများ BS4 စစ်ထုတ်မှုများ

Bootstrap 4 Grid

BS4 Grid စနစ် BS4 သည် အထပ်လိုက်/အလျားလိုက် BS4 Grid XSmall BS4 Grid အသေး BS4 Grid Medium BS4 Grid အကြီး BS4 Grid XLarge BS4 Grid နမူနာများ

Bootstrap 4 အခြား

BS4 အခြေခံ Template BS4 လေ့ကျင့်ခန်းများ BS4 Quiz

Bootstrap 4 Ref

အတန်းအားလုံး JS သတိပေးချက် JS ခလုတ် JS ချားရဟတ် JS ခေါက်သိမ်းပါ။ JS Dropdown JS Modal JS Popover JS Scrollspy JS Tab JS Toasts JS Tooltip


Bootstrap JS Dropdown


Dropdown CSS Classes

Dropdowns အကြောင်း သင်ခန်းစာအတွက်၊ ကျွန်ုပ်တို့၏ Bootstrap Dropdowns Tutorial ကို ဖတ်ရှုပါ ။

Class Description Example
.dropdown Indicates a dropdown menu
.dropdown-item Style links inside the dropdown menu with proper padding etc
.dropdown-item-text Style text or text links inside the dropdown menu with proper padding etc
.dropdown-menu Builds the dropdown menu
.dropdown-menu-right Right-aligns a dropdown menu
.dropdown-header Adds a header inside the dropdown menu
.dropup Indicates a dropup menu
.disabled Disables an item in the dropdown menu
.active Styles the active element in a dropdown menu
.divider Separates items inside the dropdown menu with a horizontal line

data-* Attributes မှတဆင့်

data-toggle="dropdown"dropdown menu ကိုပြောင်းရန် လင့်ခ်တစ်ခု သို့မဟုတ် ခလုတ်တစ်ခုသို့ ထည့်ပါ ။

ဥပမာ

<button type="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown Example</button>

JavaScript မှတဆင့်

ကိုယ်တိုင်ဖွင့်ပါ-

ဥပမာ

$('.dropdown-toggle').dropdown();

မှတ်ချက်- သင် dropdown() နည်းလမ်းကို ခေါ်သည်ဖြစ်စေ data-toggle="dropdown" attribute လိုအပ်ပါသည်။


Dropdown ရွေးစရာများ

None

ဆွဲချနည်းများ

အောက်ဖော်ပြပါဇယားတွင် ရရှိနိုင်သော dropdown နည်းလမ်းများအားလုံးကို စာရင်းပြုစုထားသည်။

Method Description Try it
.dropdown("toggle") Toggles the dropdown. If set, it will open the dropdown menu by default
.dropdown("update") Updates the position of an element's dropdown
.dropdown("dispose") Destroys an element's dropdown

ဆွဲချပွဲများ

အောက်ဖော်ပြပါ ဇယားတွင် ရရှိနိုင်သော dropdown အစီအစဉ်များအားလုံးကို စာရင်းပြုစုထားသည်။

Event Description Try it
show.bs.dropdown Occurs when the dropdown is about to be shown.
shown.bs.dropdown Occurs when the dropdown is fully shown (after CSS transitions have completed)
hide.bs.dropdown Occurs when the dropdown is about to be hidden
hidden.bs.dropdown Occurs when the dropdown is fully hidden (after CSS transitions have completed)

အကြံပြုချက်- dropdown ကို အစပျိုးသည့် ဒြပ်စင်ကို ရယူရန် jQuery ၏ event.relatedTarget ကို အသုံးပြုပါ-

ဥပမာ

$(".dropdown").on("show.bs.dropdown", function(event){
  var x = $(event.relatedTarget).text(); // Get the text of the element
  alert(x);
});