Forums
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Remove and load
I assume I’ve got your point there. $.load() should be what you are looking for.
[jQuery API – $.load](http://api.jquery.com/load/)
Also, check out this screen cast from chris:
[ AJAXing a WordPress theme](https://css-tricks.com/video-screencasts/81-ajaxing-a-wordpress-theme/)
Just register on the tab-button click event and load the content from another URL.
So it’s not possible to use the load or any other javascript/jquery function to load code, it that it? It always have to be from an external url.
Oh, and you should be aware that your content won’t be visible to SEO bots unless it’s in a permitted subdirectory.
Ok, that’s a start. So I can get the HTML code with get() and when the click occurs I can use append() to insert it. I just need a function to remove HTML to achieve what I want.
I think remove() will do it
Is there a way to have a callback when the stuff inserted with append finishes loading?