@RadEdje I have found wikipedia's api explaination difficult to understand - I know a lot of campers have spent hours just trying to get a simple search happening. I think for now its better to just figure out the complexities of the json rather than trying to figure out their api structures
@shivamsonu29 if the api call is not successful nothing will get executed there
hey @shivamsonu29 , i had this problem last night i think. someone told me that the site isn't set up to handle cross-origin requests for json. we found that using a proxy site for the json worked. the one we used was "https://jsonp.afeld.me/?callback=?&url=" + whatever the url of the json you're trying to reach.
@shivamsonu29 so if api is a variable for the url, your code would look like this
So this is driving me a little crazy. When the page loads, it will call getQuote twice, once in the document ready and then it hits my .click as well. But when I actually click the button that the id is tied to, nothing happens. Why is it working twice on load and not working at all when I click? http://codepen.io/Eldorian/pen/qNbQgv
I know I'm missing something obvious but been trying to troubleshoot for 30 minutes now with no idea
For some reason your button doesn't seem to register clicks at all
I thought maybe I was missing a parenthesis somewhere, I've tried renaming the id, it shouldn't even be triggering the .click on page load and it somehow does
I even tried using onclick
I really can't figure out why
well now I don't feel as bad, lol
@Eldorian I kinda have a janky solution for your pen. I moved the "$('#quotebutton').click(getQuote());" into the getquote function itself, and replaced getQuote with function. Difficult to explain, but I forked the pen here: http://codepen.io/JETZero3/pen/MeyWVv
I'm not sure it solved the original problem you were looking at though =/
@Eldorian You supply click a function, but you are calling the function.
that's what it was @sjames1958gm thank you
eldorian sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
Hey all... I just finished updating my JS calculator from feedback I got here a couple days ago.. Would appreciate any and all feedback on the updated version. Thanks. http://codepen.io/jer244/pen/yJLrmM
@jer244 Works good. Don't see any issues.
@MrNoahz thanks for testing it out
jer244 sends brownie points to @mrnoahz :sparkles: :thumbsup: :sparkles: