Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8765945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:25:20+00:00 2026-06-13T16:25:20+00:00

I try to have some content loaded on WordPress thanks to Jquery .load() .

  • 0

I try to have some content loaded on WordPress thanks to Jquery .load(). Sometimes, when my code is OK, it’s not working anymore the day after…

I’m trying to narrow the causes. First I thought it was a syntax problem or a single/double quote mix up, but since it worked once, there is no reason syntax or error is involved.
I thought about bad cache settings but shift+F5 won’t break my working code.

And now I just tried, with a perfectly working code, to close and restart WAMPserver. And Bingo, when I restart the server it’s impossible to get my load function to work (the same from 1 min before…) !

EDIT: I just replaced the code (below) with the one I’m using now

$(document).ready(function(){
    $.ajaxSetup({cache:false});
    $("#portfolio-list li:not(#DrawerContainer)").click(function(){
        var post_link = $(this)
             //.parentsUntil(".ProjectWrap") 
             //.parent()
             .find('.mosaic-backdrop')
             .attr("href");
    console.debug(post_link); //to get post_link info in the console
    $('#DrawerContainer').remove(); // remove existing, if any
    $('<li/>').attr('id', 'DrawerContainer').css({display: 'none'}).data('citem', this).html("loading...").load(post_link + " #container > * ").insertAfter(LastInRow).slideDown(500);
    return false; 
    });
});

When the function isn’t working, I try to remove the part .load(post_link + " #container > * "); and replace it with the part just after (a complete url). Usually it works and at least I can continue styling my page, but I have to fix the problem.

What can cause this weird behavior? Can WAMPserver rewrite something while closing?
Is there an option I could check?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:25:21+00:00Added an answer on June 13, 2026 at 4:25 pm

    Although this was solved in the question’s comments, here is an answer for anybody skimming the page.

    There is an issue with running ajax requests across different domains. Your WAMPserver does not like it and will stop it unless you tell it otherwise. Although you are working locally, WAMPserver thinks http://localhost/ is different to http://127.0.0.1/.

    To get around this, in the file that handles your ajax add this:
    <?php header('Access-Control-Allow-Origin: *'); ?>

    Note, you can change the * for a URL too (e.g. http://127.0.0.1/

    If that does not work, you may have to change settings on your server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code like this: try { doStuff(); } catch(SpecificException) { if(e.Message ==
I have some cleanup code which may try to refer to an (stateful) EJB
I have some code that looks like this: foreach(var obj in collection) { try
I have some code to update a database table that looks like try {
I have some content from server using $.ajax() function. I try to replace some
I try to have some inheritance with attributeBindings between two View. (function(exports) { Ember.MobileBaseView
I have some trouble when I try to map object to int . My
I have some problem with Emit mapper when I try to save in database
I have some buttons I am trying to create, and when I try to
I have some text which I want to have on separate lines. I try

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.