jQuery ကျူတိုရီရယ်

jQuery ပင်မစာမျက်နှာ jQuery မိတ်ဆက် jQuery စတင်လိုက်ပါ။ jQuery Syntax jQuery ရွေးချယ်မှုများ jQuery ပွဲများ

jQuery အကျိုးသက်ရောက်မှုများ

jQuery ဖျောက်/ပြပါ။ jQuery အရောင်မှိန်ခြင်း။ jQuery Slide jQuery Animate jQuery stop() jQuery ပြန်ခေါ်ပါ။ jQuery ချိတ်ဆက်ခြင်း။

jQuery HTML

jQuery ကိုရယူပါ။ jQuery သတ်မှတ် jQuery ကိုထည့်ပါ။ jQuery ကိုဖယ်ရှားပါ။ jQuery CSS အတန်းများ jQuery css() jQuery အတိုင်းအတာများ

jQuery လမ်းလျှောက်ခြင်း။

jQuery လမ်းလျှောက်ခြင်း။ jQuery ဘိုးဘေးများ jQuery မျိုးဆက်များ jQuery မောင်နှမများ jQuery စစ်ထုတ်ခြင်း။

jQuery AJAX

jQuery AJAX နိဒါန်း jQuery Load jQuery Get/Post

jQuery ထွေ

jQuery noConflict() jQuery စစ်ထုတ်မှုများ

jQuery ဥပမာများ

jQuery ဥပမာများ jQuery စာမေးပွဲ jQuery လေ့ကျင့်ခန်းများ jQuery လက်မှတ်

jQuery ကိုးကားချက်များ

jQuery ခြုံငုံသုံးသပ်ချက် jQuery ရွေးချယ်မှုများ jQuery ပွဲများ jQuery အကျိုးသက်ရောက်မှုများ jQuery HTML/CSS jQuery လမ်းလျှောက်ခြင်း။ jQuery AJAX jQuery ထွေ jQuery ဂုဏ်သတ္တိများ

jQuery toggle() နည်းလမ်း

❮ jQuery Effect နည်းလမ်းများ

ဥပမာ

<p> ဒြပ်စင်အားလုံးအတွက် ဖျောက်နှင့် ရှိုးများကြားတွင် ပြောင်းပါ-

$("button").click(function(){
  $("p").toggle();
});

အဓိပ္ပါယ်နှင့် အသုံးပြုမှု

toggle() နည်းလမ်းသည် ရွေးထားသော အစိတ်အပိုင်းများအတွက် hide() နှင့် show() ကြားတွင် ပြောင်းပေးသည်။

ဤနည်းလမ်းသည် ရွေးချယ်ထားသော အစိတ်အပိုင်းများကို မြင်နိုင်စွမ်းရှိစေရန် စစ်ဆေးသည်။ အစိတ်အပိုင်းတစ်ခုကို ဝှက်ထားလျှင် show() ကို လုပ်ဆောင်သည်။ အစိတ်အပိုင်းတစ်ခုကိုမြင်ပါက hide() ကို run သည် - ၎င်းသည် toggle effect ကိုဖန်တီးပေးသည်။

မှတ်ချက်

အကြံပြုချက်- ဤနည်းလမ်းကို စိတ်ကြိုက်လုပ်ဆောင်ချက်များအကြား ပြောင်းရန်လည်း အသုံးပြုနိုင်သည်။


အထားအသို

$(selector).toggle(speed,easing,callback)

Parameter Description
speed Optional. Specifies the speed of the hide/show effect

Possible values:

  • milliseconds
  • "slow"
  • "fast"
easing Optional. Specifies the speed of the element in different points of the animation. Default value is "swing"

Possible values:

  • "swing" - moves slower at the beginning/end, but faster in the middle
  • "linear" - moves in a constant speed
Tip: More easing functions are available in external plugins
callback Optional. A function to be executed after the toggle() method is completed

To learn more about callback, visit our jQuery Callback chapter


သင်ကိုယ်တိုင်စမ်းကြည့်ပါ - ဥပမာများ


ရာမီတာ ကိုအသုံးပြုခြင်း ဝှက်ခြင်း/ပြသမှုအကျိုးသက်ရောက်မှု၏အမြန်နှုန်းကိုသတ်မှတ်ရန် အမြန်နှုန်းကန့်သတ်ဘောင်ကိုအသုံးပြုနည်း။


ကိုအသုံးပြုခြင်းဖြင့် hide/show effect များကြားတွင် toggle လုပ်သည့်အခါ callback parameter ကိုအသုံးပြုနည်း။


❮ jQuery Effect နည်းလမ်းများ