Friday, August 16, 2013

JQuery can't find my div element

JQuery can't find my div element

I have jquery function in my script file:
function modalpopup(id)
{
var searchid = "\"#" + id + "\"";
var element = $(searchid );
element.dialog({
height: 340,
width: 500,
modal: true
});
}
in my asp.net 2.0 file I have the following:
<a id="_ctl0_MainContentPlaceHolder_DataGrid1__ctl2_HyperLinkInfo"
onclick="modalpopup('_ctl0_MainContentPlaceHolder_DataGrid1__ctl2_details10')">
<img src="../Images/info_icon.PNG" border="0" /></a>
<div id="_ctl0_MainContentPlaceHolder_DataGrid1__ctl2_details10"
title="Dialog Title"
style="display: none;">
<center>
<table class="table_class" cellspacing="1" cellpadding="2"
rules="all" border="1"
id="_ctl0_MainContentPlaceHolder" style="border-style: None;
height: 24px; width: 800px;
font-size: 16px;">
<tr class="table_header_class" style="color: DarkGray;
font-weight: bold; font-size: 16px;
white-space: nowrap">
<td style="white-space: nowrap">
customer details </td>
</tr>
</table>
</center>
</div>
Its look like its a simple jquery job to find the div element but the
jquery result is null!!
What I'm doing wrong here? There is no error format in my html code
Please help

No comments:

Post a Comment