This is my div in the aspx page:
<div id="pop-up">
<button id="btnClose">Close</button>
<div id="mopopuptitle">
</div>
<table id="popuptable" cellspacing="15">
</table>
</div>
This is my js code:
$('td#' + parentElement).find('span.download_active').next().hover(function (e) {
topPos = e.pageY - ($('div#pop-up').height()) - 35;
leftPos = e.pageX - ($('div#pop-up').width()) - 30;
if (leftPos < 0) { leftPos = 10; }
GetAssociatedPeopleList(json_row.value.task_id);
$('div#pop-up').show().css('top', topPos).css('left', leftPos).appendTo('body');
$('#mopopuptitle').html('People who have taken up this Request');
$('#btnClose').button({ icons: { primary: "ui-icon-closethick" }, text: false })
.css({ width: '30px', height: '20px', position: 'absolute', right: -'25px', top: '-25px' })
.click($(this).close());
}, function() {
});
The above code has some business logic. Dont bother about that.. All i need is when i click the close button the pop up has to be closed..
I have tried these lines..
$('div#pop-up').show().css('top', topPos).css('left', leftPos).appendTo('body');
$('#mopopuptitle').html('People who have taken up this Request');
$('#btnClose').button({ icons: { primary: "ui-icon-closethick" }, text: false })
.css({ width: '30px', height: '20px', position: 'absolute', right: -'25px', top: '-25px' })
.click($(this).close());
I couldn achieve by trying this code.. What should i change?? Is there any alternative for this?? Please help me out..
Try this code on “OnClientClick” event of your close button