WordPress.org

Support

Support » How-To and Troubleshooting » jquery .load not loading files outside of wordpress directory

jquery .load not loading files outside of wordpress directory

  • 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

  • The topic ‘jquery .load not loading files outside of wordpress directory’ is closed to new replies.