2016-10-21 16 views

回答

1

您可以使用$(this).parent()選擇其父項,然後詢問其寬度。

1
//This will give you the outer width 
$("#fancyBox_Container").outerWidth(); 

//This will give you parent outer width, in place of id, you can give direct element id or class name 
$("#fancyBox_Container").parents().outerWidth(); 
相關問題