Scale effect using Jquery UI

Syntax of Scale effect using Jquery UI.

$( "#element" ).effect( "scale",{direction:value,origin:value,percent:value,scale:value},speed,function(){

})
Here we have given "scale " as effect. All other parameters are optional

Let us start with default scale effect, d1 is id of our div layer.
$( "#d1" ).effect( "scale" );
Usually it is connected to Click event of a button, here button id is b1
$('#b1').click(function(){
$( "#d1" ).effect( "scale" );
})
We can add optional parameter percent to manage percentage it scale to
$( "#d1" ).effect( "scale",{percent:80});
Similarly we can add direction
$( "#d1" ).effect( "scale",{direction:'vertical'});
WE can add callback function to this, the function will display an alert window with message once the scale effect is over.

Here is the code with all optional values
	
$('#b1').click(function(){
$( "#d1" ).toggle( "scale",5000,function(){
alert('This alert is created by using callback function once the toggle is over');
});
})

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here .







    Most Popular JQuery Scripts

    1

    Two dependant list boxes

    2

    Calendar with Date Selection

    3

    Data change by Slider

    4

    Show & Hide element


    JQuery Video Tutorials




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2021 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer