Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
95
rated 0 times [  96] [ 1]  / answers: 1 / hits: 40740  / 13 Years ago, tue, august 9, 2011, 12:00:00

How can I set DOP_ThumbnailGallery_Container to have the width of the parent container



$('.DOP_ThumbnailGallery_Container', Container).width($(Container).width());


I tried this way / but it doesn't work, it gives the width of the window;



I even tried to have the outer container with overflow hidden, but it breaks it!


More From » jquery

 Answers
11

Or something like ...



http://jsfiddle.net/y3597/2/



$('#object').width($('#object').parent().width());

[#90726] Sunday, August 7, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kristinsonjab

Total Points: 364
Total Questions: 98
Total Answers: 98

Location: Christmas Island
Member since Mon, Oct 19, 2020
4 Years ago
kristinsonjab questions
Fri, Mar 4, 22, 00:00, 2 Years ago
Fri, Jan 22, 21, 00:00, 3 Years ago
Fri, Aug 14, 20, 00:00, 4 Years ago
;