Show checkbox on hover over
I have a table which has rows that has one column in which data is displayed as link and in another column of that row,i have a checkbox .I am looking for a jquery in which on hover over link,the check box is displayed and then i can check the checkbox to perform action.
<td>
<span id="hoverspan"><s:a href="#" onclick="DisplaySelectedPart('%{#stat.index+1}')" ><s:label id="internalNumber" value="%{internalNumber}" /></s:a></span>
<span id="chkdel"><s:checkbox name="selectBox" value="checked" onclick="DeleteSelectedPart('%{#stat.index+1}')" />Delete</span>
</td>
I thought i can do this with the below jquery hover but when i mover my mouse out of the link this check box also disappears.
$("#hoverspan").hover(
function () {
$("#chkdel").show();
},
function () {
$("#chkdel").hide();
}
);
Please guide me how to acheive this