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
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts

    get height of an object and then add more and apply

    Hi,

    I would like to add a margin-top to my .thumbs but don't know if I wrote my code correctly?!

    Code:
    onAfter: function(){
    	    var img = $('ul.gallery li').height;
    	    img+=50;
    	    $('.thumbs').css({'marginTop':img});
    }

  • #2
    Regular Coder
    Join Date
    Jul 2010
    Location
    Sheffield
    Posts
    824
    Thanks
    93
    Thanked 18 Times in 18 Posts
    Not tested but try $('ul.gallery li').height();


  •  

    Posting Permissions

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