I have declared two variables globally in my js code. In one of the function I am storing the value of the screen coordinates in them. Now I want to use these values in another function. How can I do that?
var xCoord;
var yCoord;
var getBrowserCood = $("#Boma").mousedown(function(e) {
if(e.button==2){
xCoord = e.pageX;
yCoord = e.pageY;
}
});