I cant get my json data even in a simple way using the jquery api example and as a result i have only 2 console logs before and after request. I used local host denwer and xampp for test. Turn off all of my extensions, because i have an idea it was adblock blocking my request... P.S. sorry for bad English
{
"articles": [
{
"id": 1,
"name": "How to build a website"
},
{
"id": 2,
"name": "Reading json with jquery"
},
{
"id": 3,
"name": "Learning javascript"
},
]
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JSON</title>
<script src="js/jquery-3.2.1.js"></script>
<script>
console.log('before request');
$.getJSON( "ajax/articles.json", function( data ) {
console.log('success');
console.log(data.articles);
});
console.log('after request');
</script>
</head>
<body>
</body>
</html>