I have one link which opens a div and it works fine, but I cannot make it to move to location of mouse click. Code is as follows:
Link:
<a href="#" onclick="show_popup('my_popup')" id="napFilt">Filter</a>
Function:
function show_popup(id) {
if (document.getElementById){
obj = document.getElementById(id);
if (obj.style.display == "none") {
obj.style.display = "";
}
}
}
Using JS, how can I make the displayed div move to the position of the mouse click?