I have a list of images on my website, and I because of different resolutions on viewers screens, the tot开发者_JAVA技巧al height of the div changes. I need to set the "top" value as the height of ".photoswrap". Thanks for any help.
$("#something").css("top", $(".photoswrap").css("height"));
I cannot give a working answer with seeing the code, but:
var $someDiv = $('div');
$someDiv.css('top', $('.photoswrap', $someDiv).height());
Or if .photoswrap
is not inside of the div specifically:
$('div').css('top', $('.photoswrap').height());
精彩评论