#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    204
    Rep Power
    3

    Sidepanel good practice?


    Hi.

    i have a div which overlays my website when i click a button.. now i'm using this code to accomplish this..

    I change the width from 0 to 300. And reversed to close
    but i'm wondering, is this good practice?

    Code:
    $('#panel').animate({width: "300px"}, 500, "easeInExpo");
    $('#panel').animate({width: "0px"}, 250, "easeInExpo");
  2. #2
  3. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,165
    Rep Power
    184
    Define "good practice"... and... what about it; would give you the impression, that it is not "good practice"?

IMN logo majestic logo threadwatch logo seochat tools logo