-2
如何在表格頂部創建div顯示tr,以便表格行不會展開。如何讓我的div覆蓋在其他表格的頂部?
當我單擊任何「.property_menu_link」定位標記以展開整個行擴展的菜單時。我希望菜單覆蓋在TR的頂部,而不是擴大表格,但我正在努力實現這一目標。
我在做什麼錯? HTML:
<table>
<tr>
<td valign="top" align="left">
<div class="property_menu_container">
<div style="display: none;" class="property_links_box ui-corner-all">
<ul class="basic">
<li>
<a onclick="open_me()" >Property Details</a>
</li>
<li>
<a onclick="open_me()" >Units, Leases & Occupants</a>
</li>
</ul>
</div>
<div class="property_menu_link">
<a>
<img src="images/maximize.png" id="68_p_img_folder">
</a>
</div>
</div>
<span class="page_name property_name_span">Property Name 1 Here</span>
</td>
</tr>
<tr>
<td valign="top" align="left">
<div class="property_menu_container">
<div style="display: none;" class="property_links_box ui-corner-all">
<ul class="basic">
<li>
<a onclick="open_me()" >Property Details</a>
</li>
<li>
<a onclick="open_me()" >Units, Leases & Occupants</a>
</li>
</ul>
</div>
<div class="property_menu_link">
<a>
<img src="images/maximize.png" id="68_p_img_folder">
</a>
</div>
</div>
<span class="page_name property_name_span">Property Name 2 Here</span>
</td>
</tr>
</table>
CSS:
/******************************
Property Menu dropdown
******************************/
.property_menu_container {
width: 200px;
/*height: 300px; --> this causes the row height for properties to be 300px before it's expanded*/
position: relative;
}
.property_name_span{position: absolute; left:40px;}
.property_links_box {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 15px;
padding:10px;
border: 3px solid #000000;
background-color: #FFFFFF;
filter:alpha(opacity=75);
opacity:.75;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; /*--IE 8 Transparency--*/
}
.property_menu_link {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.property_links_box{
z-index: 10;
}
/******************************
END Property Menu dropdown
******************************/
的Javascript:
$(document).ready(function(){
$("div.property_menu_link a").toggle(function(){
//1st Click
$(this).parent().siblings(\'.property_links_box\').show();
$(this).parent().parent(\'.property_menu_container\').css("height", "300px");
}, function() {
//2nd click
$(this).parent().siblings(\'.property_links_box\').hide();
$(this).parent().parent(\'.property_menu_container\').css("height", "1px")
});
});
對不起質疑,但這不是充分分離的問題。你在Javascript中也有隨機反斜槓,我肯定不應該在那裏! –
我已經更新了...反斜槓是用於php的......我在我的php腳本中生成了這個特定的javascript,當它寫出來時,反斜槓不在那裏。 – Ronedog