Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JS assistance in a basic slide etc

    I have the following code but I want to make it so I have the option available that lets me have it slide in from left, from bottom, from top and from right...

    Also wondering how complicated it may be to have all the slide/fade options available to me?

    This is the area I'm told I have to alter but I'm not a coder so have no idea what to alter

    Appreciate any assistance in getting this done asap.

    Code:
    /***************** Image with Animation *******************/
    
    $('img.img-with-animation').each(function() {
    
    $(this).appear(function() {
        if($(this).attr('data-animation') == 'fade-in-from-left'){
            $(this).animate({
                'opacity' : 1,
                'left' : '0px'
            },600);
        } else if($(this).attr('data-animation') == 'fade-in-from-right'){
            $(this).animate({
                'opacity' : 1,
                'right' : '0px'
            },600);
        } else {
            $(this).animate({
            'opacity' : 1
        },600);
        }
    },{accX: 0, accY: -155},'easeInCubic');
    
    });

  • #2
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can anyone assist?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •