WordPress.org

Ready to get started?Download WordPress

Forums

jquery .load not loading files outside of wordpress directory (1 post)

  1. stairmaster
    Member
    Posted 1 year ago #

    Hi, I would like to include a html file using jquery that is outside of the wordpress directory, but still in the same domain.

    I can get it to work if the html file is within the wordpress directory, but anything outside doesn't work.

    IE -

    $(document).ready(function($){
      $('#my_div').load('in_dir.html'); // this works
      $('#my_div').load('../out_of_dir.html'); // DOESN'T WORK
    });

    I've tried
    .get
    .ajax

Topic Closed

This topic has been closed to new replies.

About this Topic