具有jquery的父容器的宽度 [英] Width of the parent container with jquery

查看:104
本文介绍了具有jquery的父容器的宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置DOP_ThumbnailGallery_Container以具有父容器的宽度

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

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

我试过这种方式/ \但它不工作,它给出的宽度 window ;

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!

推荐答案

或类似...

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

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

这篇关于具有jquery的父容器的宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆