jQuery Effect fadeTo() နည်းလမ်း
ဥပမာ
<p> ဒြပ်စင်အားလုံး၏ ပွင့်လင်းမြင်သာမှုကို တဖြည်းဖြည်း ပြောင်းလဲပါ-
$("button").click(function(){
$("p").fadeTo(1000, 0.4);
});
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
fadeTo() နည်းလမ်းသည် ရွေးချယ်ထားသော ဒြပ်စင်များအတွက် အလင်းပိတ်မှုကို သတ်မှတ်ထားသော အလင်းပိတ်မှု (fading effect) သို့ တဖြည်းဖြည်း ပြောင်းလဲပါသည်။
အထားအသို
$(selector).fadeTo(speed,opacity,easing,callback)
Parameter | Description |
---|---|
speed | Required. Specifies the speed of the fading effect. Possible values:
|
opacity | Required. Specifies the opacity to fade to. Must be a number between 0.00 and 1.00 |
easing | Optional. Specifies the speed of the element in different points of the animation. Default value is "swing" Possible values:
|
callback | Optional. A function to be executed after the fadeTo() method is completed
To learn more about callback, visit our jQuery Callback chapter |
သင်ကိုယ်တိုင်စမ်းကြည့်ပါ - ဥပမာများ
ကိုအသုံးပြုခြင်းဖြင့် ဒြပ်စင်တစ်ခုအတွင်း မှိန်သွားသောအခါ callback parameter ကိုအသုံးပြုနည်း။