This probably has been answered elsewhere but I for the life of me can not get this to work.
Here is my html:
<!Doctype html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="JS.js"></script>
</head>
<body>
<div>
</div>
</body>
</html>
and here is my Js file:
$( document ).ready(function() {
console.log( 'ready!' );
$.ajax({
url: 'http://steamcommunity.com/market/priceoverview/?appid=730¤cy=3&market_hash_name=StatTrak%E2%84%A2%20M4A1-S%20|%20Hyper%20Beast%20(Minimal%20Wear)',
type: 'GET',
dataType: 'jsonp',
success: function(data) {
console.log(data);
var lowestprice = $( 'lowest_price' );
console.log($target);
}
});
});
The result of the query is:
{"success":true,"lowest_price":"48,--\u20ac","volume":"12","median_price":"51,02\u20ac"}
but I get the error uncaught SyntaxError: Unexpected token :
Thank you in advance, I'm experimenting with web programming and am struggling cause I am more used to object oriented programming.
console.log($target)and$targetis not defined anywhere makes me think you're not showing all the relevant partsvar lowestprice = $( 'lowest_price' );will not work until.(class selector) or#(id selector) not used with'lowest_price'