I have a Cocoa WebView that displays a local HTML file. I'm trying use jQuery.load() to load another local HTML file into a div. My JavaScript code goes something like this:
$("#mydiv").load("test.html"); // test.html is a local file inside the app's bundle
I don't see any exceptions but it will not load the html inside the div. I'm using exactly the same code for an iOS app, and it works fine. I've also tried using XMLHttpRequest() and I can see the responseText fine.
Any advice? Thanks in advance!
$(document).readybefore the.load()to ensure the page is fully there before trying to load something new into it. Depending on load time I've had JS fail due to the targetted div not being there when it's trying to execute.