jQuery प्रभाव फीका करने के लिए () विधि
उदाहरण
सभी <p> तत्वों की अस्पष्टता को धीरे-धीरे बदलें:
$("button").click(function(){
$("p").fadeTo(1000, 0.4);
});
परिभाषा और उपयोग
फ़ेडटो () विधि धीरे-धीरे चयनित तत्वों के लिए अस्पष्टता को एक निर्दिष्ट अस्पष्टता (लुप्त होती प्रभाव) में बदल देती है।
वाक्य - विन्यास
$(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 |
इसे स्वयं आज़माएं - उदाहरण
का उपयोग करना किसी तत्व के अंदर और बाहर लुप्त होने पर कॉलबैक पैरामीटर का उपयोग कैसे करें।