Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Remove and load

  • This topic is empty.
Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #117419
    SSchnitzler
    Member

    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.

    #117421
    XaviJr
    Participant

    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.

    #117424
    Paulie_D
    Member

    Oh, and you should be aware that your content won’t be visible to SEO bots unless it’s in a permitted subdirectory.

    #117425
    XaviJr
    Participant

    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.

    #117426
    XaviJr
    Participant

    I think remove() will do it

    #117428
    XaviJr
    Participant

    Is there a way to have a callback when the stuff inserted with append finishes loading?

Viewing 6 posts - 16 through 21 (of 21 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.