Callback parameter is needed when you use JSONP to circumvent limitations of cross origin request.
Format of your API call is wrong. Proper URL is https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Pokemon&format=jsonfm&origin=*
Forms are designed to send data.
There are several downsides when using forms instead of links. User experience, SEO, accessibility and a lot more code.
Thanks and I’ve updated my codepen, seems that it now works per requirement? Can you verify that?
If all okay, guess the only thing I left to do is to ensure that the search result items are clickable so it will bring to its wiki page and I’ll start working on the styling?
So I’ve updated my code and I got it almost to what I wanted, except I have a few questions:
As per in my JavaScript:
window.onscroll = function () {
//TODO: is there a cleaner way then having to define 2 of this, so it'll work on Chrome and Safari?
if (document.documentElement.scrollTop >= 20 || document.body.scrollTop >= 20) {
searchInputStyle.boxShadow = "0 5px 12px #888";
} else {
searchInputStyle.boxShadow = "none";
}
}
The issue is, I need to define both document.documentElement and document.body in order for scrollTop to work in both Chrome and Safari.
Any pointers on how do I make my element animate in such a way that when I press search, the user is able to see the Wikipedia, Search Box, Buttons elements move to the top of the page and expand accordingly (currently it sorta does the end of this upon pressing search)
Is it possible to receive more than 10 search results? How?
I noticed a delay upon displaying the search result, why is that and is it possible to be fixed?
How do we debug sites on mobile cause I have this issue
Notice how the search box has rounded edges, I tried adding border-radius: 0 and even tried a few “fixes” from SO but it doesn’t seem to work. And I noticed the search button is stuck on the hover state unless I click on the text box again. Any idea why and how do I fix it?
And feel free to comment on any other part of my code