Here is my javascript code:
$(document).ready(function(){
var value;
$("#submit").click(function(){
value=$("#search").val();
console.log(value);
var url=“https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=bill&callback=?";
$.getJSON(url,function(data){
console.log(data);
});
});
$(“input[type=text]”).on(“click”,function(){
$(”#search").css(“width”,“75%”);
});
});
The problem is that when I write the getJSON function outside the click function then codepen is receiving data but after nesting the click function and getJSON the API is not responding.In the browser console there is no error so I am finding it hard to debug the code.
Here is the link to my pen: