0

I'm trying to write some html pages that I'm currently storing locally (on a Windows machine without any server running). I'd like to pull one file's html into another. I'm very novice when it comes to this kind of thing.

I found a couple of questions/answers on stackoverflow (1,2), but they both refer to deprecated jquery function "load". Specifically, it has a call to $("#myId").load("b.html");. Looking for how to migrate the load call to on, I see an answer that you need

$(window).on('load', function(){
// insert code here
});

Except I don't know what to put in the function itself. (The original answer just had a string that was the filename.

Any pointers?

Rob
  • 2,243
  • 4
  • 29
  • 40
user3550496
  • 333
  • 5
  • 14
  • 1
    The load function to load an external resource and set the content to replace an html element's content is not deprecated. You are confusing this with the load event. – NineBerry Oct 17 '17 at 22:11
  • Thanks. This got me to the point where I found out that I can't use load for local files (per https://threejs.org/docs/#manual/introduction/How-to-run-thing-locally. Well, I can, but it requires disabling security or installing a web server.) Is there an option available for my situation? – user3550496 Oct 18 '17 at 04:07
  • 1
    I think your hands may be tied there @user3550496 that said, there's no shortage of web-servers you can use. `mamp`, `wamp` and `xampp` are good for beginners. If you're on linux you already have Apache installed, visit `localhost:127.0.0.1` – admcfajn Oct 18 '17 at 07:02

0 Answers0