jQuery fadeToggle() နည်းလမ်း
ဥပမာ
ကွဲပြားသောအကွက်များ မှိန်သွားခြင်းနှင့် မှိန်သွားခြင်းကြား ခလုတ်
$("button").click(function(){
$("#div1").fadeToggle();
});
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
fadeToggle() နည်းလမ်းသည် fadeIn() နှင့် fadeOut() နည်းလမ်းများကြားတွင် ပြောင်းပေးသည်။
ဒြပ်စင်များ မှေးမှိန်သွားပါက fadeToggle() တွင် ၎င်းတို့ကို မှိန်သွားပါမည်။
ဒြပ်စင်များ မှိန်သွားပါက fadeToggle() သည် ၎င်းတို့ကို မှိန်သွားပါမည်။
မှတ်ချက် ။
အထားအသို
$(selector).fadeToggle(speed,easing,callback)
Parameter | Description |
---|---|
speed | Optional. Specifies the speed of the fading effect. Default value is 400 milliseconds Possible values:
|
easing | Optional. Specifies the speed of the element in different points of the effect. Default value is "swing" Possible values:
|
callback | Optional. A function to be executed after the fadeToggle() method is completed
To learn more about callback, please read our jQuery Callback chapter |
သင်ကိုယ်တိုင်စမ်းကြည့်ပါ - ဥပမာများ
သောအကျိုးသက်ရောက်မှု၏အမြန်နှုန်းကိုသတ်မှတ်ရန် အမြန်နှုန်းပါရာမီတာကိုအသုံးပြုနည်း။
ကိုအသုံးပြုခြင်း fadeToggle() method ပြီးသွားပြီးနောက် function တစ်ခုလုပ်ဆောင်ရန် callback parameter ကိုအသုံးပြုနည်း။