Wikipedia API not showing

Hi guys, i need yet another help with my project.

So i already made the wikipedia API link using opensearch and it work, it show the json on the browser.
However, when i use it on my code, sometimes it appear but most of the time it didn’t. Especially when i add click or submit function, it just didn’t work, nothing happens. I already tried several click function, but still the same.
Is it the link that is not working or is it the code? Please help me guys, i have search online but still nothing has worked.

	var searchURL = '' + document.getElementById("inputsearch").value + '&limit=10&callback=?';
	url: searchURL,
    success: function(data) {

Your page is refreshing on submit. Add an event parameter in the submit handler then call event.preventDefault(), like

$('form').submit(function(event) {
  // ... rest of the code

You’d be then hit with a CORS problem, but someone wrote about how to deal with it here:

Awww damn, it works like magic!

Thank you so much!