I have written a short script that takes the pagex and pageY coordinates of a mouse click and appends them to a list. Everything functions except the button that is supposed to clear the list( a click appearing even when the clear button is pressed also happens but that is not an issue)
anyway I corrected some work in jsfiddle and everything works fine there, but when I made the the same corrections in notepad++ the button doesnt function at all. IE it does not clear the list, but when I click the same button in jsfiddle it works fine. Have tested on mozilla Chrome and IE
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title> Click Away</title>
<link href="stylesheets/site.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script>
$(document).click(function(e){
$("#coordList").append("<li>"+ "pageX: " + e.pageX + ", pageY: " + e.pageY +"</li>");
});
$("#clear").click(function() {
$("#coordList").empty();
});
</script>
</head>
<body>
<div id="wrapper">
<header>
<h1> Coordinates </h1>
</header>
<button id="clear"> Clear list </button>
<div id="list">
<ol id="coordList"></ol>
</div>
</div>
</body>
</html>