I trying to create simple web app in mvc4.
In my view i used below scripts
<link href="~/Content/jquery.mobile-1.4.2.css" rel="stylesheet" />
<script src="~/Scripts/jquery-2.1.1.js"></script>
<script src="~/Scripts/jquery.mobile-1.4.2.min.js"></script>
And one simple button calling javascript function getWeather() when clicked.
<input type="button" data-icon="refresh" id="btnNewLoc" data-iconpos="notext" name="SaveButton" onclick="getWeather();" />
But my problem is when i clicked button is not hitting my below java script function.
<script type="text/javascript">
function getWeather() {
var URL = "/Weather/GetWeather/" + $("#Location").val();
$.get(URL, function (data) {
$("#Result").html(data);
});
}
</script>
Please guide me.