3

Help, again! I’m doing a simple ajax using jquery’s load function but for some reason it results in a refresh of the entire page! There’s no callback or any other values being passed, it’s just the url to the html file. Btw even if i reduce the html file I’m sucking in to an innocent <p>hello</p>, it still fucks up and the page reloads so it’s not like there’s some bad javascipt going off. This is part of a project being done using codesandbox, so I’m not sure if there’s something going on with it. This is my first ajax in this environment

Comments
  • 2
    Step 1) uninstall jquery
    Step 2) use fetch().text()
    Step 3) innerHtml
  • 3
    stackoverflow.com
  • 0
    @Demolishun better than jquery childs!
  • 0
    @petergriffin thanks, fetch api was a total lifesaver
  • 1
    @TeachMeCode why you using JQuery?

    Unless it's some ancient piece of monolithic chaos (just covering my self here for using jquery) , you don't use Jquery in 2021 😏
  • 2
    @C0D4 its an interview assignment. I was given this horribly written code written in jqiery and the instructions say not to use react or angular when doing this assignment so I have no choice sadly
Add Comment