<table id="tab">
<tr><td class="here">dgd</td><td class="here">dfg</td></tr>
<tr><td class="here">fgf</td><td class="here">sg4</td></tr>
</table>
<table id="new">
<tr><td id="al">sss</td></tr>
</table>
#tab td {
padding: 5px;
border: solid 1px red;
}
#new td {
padding: 5px;
height: 40px;
border: solid 1px green;
background-color: green;
}
#new {
display: none;
}
$(".here").click(function(){
$("#new").show();
})
$("#al").click(function(){
alert('ok');
})
LIVE: http://jsfiddle.net/HTHnK/
How can i modify this example for add position in jQuery? I would like – if i click on .here then table id = new should show me on this clicked TD. Additionally if i clicked outside table id = new then this should hide.
How can i make it?
You want to be like this?
http://jsfiddle.net/HTHnK/6/