Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

174
Vistas
Ajax page load Undefined

I have a problem of my page redirect into Undefined. I have not much experience in coding. I am using some of the code that I have found here. I am using a simple ajax page load code.

    $(document).ready(function() {
      // load index page when the page loads
      $("#response").html("DEFAULT");
      $("#page1").click(function() {
        // load home page on click
        $("#response").html("https://apemedia.my/without-reload-home/");
      });
      $("#page2").click(function() {
        // load about page on click
        $("#response").html("https://apemedia.my/without-reload-contact/");
      });
      $("#page3").click(function() {
        // load contact form onclick
        $("#response").html("https://apemedia.my/without-reload-about/");
      });
    
    });

The ajax page load effect is working and I continue to implement some fade in fade out effects with it. The fade in effect is alright, and also the fadeout effect seems working, but then when the page redirect, it redirect "Undefined".

$(document).ready(function () {
  $('#et-main-area').css('display', 'none');
  $('#et-main-area').fadeIn(3000);

$('.link').click(function(event) {
    event.preventDefault();

     newLocation = $('.link a').attr("href");
    $('#et-main-area').fadeOut(2500, newPage);
  });

  function newPage() {
    window.location = newLocation;
  }
        
});
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda