1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    10
    Vote Rating
    0
    dgamax is on a distinguished road

      0  

    Default Unanswered: slideDown/slideUp of an element

    Unanswered: slideDown/slideUp of an element


    Is possible to do an animation like does slideDown/SlideUp of jQuery from an element of my html ?
    I tried with jQuery it's just horrible with an iPhone 4.

    Code:
    items: [                // This is the home page, just some simple html
                    {
                        title: 'Home',
                        iconCls: 'home',
                        cls: 'home',
                        html: [
                            '<h1>Welcome to Sencha Touch</h1>',
                            "<p>Building the Getting Started app</p>",
                            '<div>Element to toggle</div>'
                        ].join("")
                    },
    Ext.Anim.run(element,'slide') dont do what I want, it slides my element but it's still visible and when it disapear my html content will be resized without animation.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    898
    Answers
    3573
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You can use the after config to change something after the animation has occurred.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    10
    Vote Rating
    0
    dgamax is on a distinguished road

      0  

    Default


    Yea but the problem is I want to resize my html content when my element is sliding.
    Like this effect :
    http://www.w3schools.com/jquery/tryi...y_slide_toggle

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    898
    Answers
    3573
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You can use showAnimation/hideAnimation so when you hide()/show() the component it will use this animation.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    10
    Vote Rating
    0
    dgamax is on a distinguished road

      0  

    Default


    Apparently it didnt work with an html element.

    Code:
    Ext.get('myID').show({    type: 'slide',
        direction: 'up',
        duration: 5000
    })
    It show & hide but without any effect.

    Code:
    html: '<div id="myID">Hello there</div>',
    myID is not a component, it's an element of my html content so is it possible ?

Thread Participants: 1