0

I some found a fix thanks to some one else advice but now I have a problem when loading and unloading content and trying to load new content into a div.

This is the code I'm using to load content into a hidden div, it loads the content, it fades up and scrolls to the top of the document if needed. Heres the code for loading content:

$(".director").click(function(){  // .director is the class of my links
  var href = $(this).attr('href');
  $('#cont_nota').load(href);
  $('#cont_nota').fadeTo( 500, 1).css('opacity','100');
  $("html, body").animate({ scrollTop: 0 }, "normal");
  return false;
});

now from within the loaded content i use this code to close the window and unload its content:

$("#cont_nota").click(function(){
  $('#cont_nota').fadeTo( 500, 0, function(){
  $("#cont_nota").empty();
  });
});

it works for a couple of clicks but after a few clicks nothing happens, the code stops working and I can see in the javascript console rue following legend:

Failed to load resource: net::ERR_CACHE_MISS

This seems to be an error in the Chrome Developer Tools console (see this post on SO: Bizarre Error in Chrome Developer Console - Failed to load resource: net::ERR_CACHE_MISS)

I'v been going about this all evening and I'm sure you can give me a hint.

Community
  • 1
  • 1
Samuel Ramzan
  • 1,770
  • 1
  • 15
  • 24
  • Try disable all extensions of browser. – Justinas Nov 04 '14 at 07:15
  • Same thing. Nothing changes... another bug is that after 5 links clicked, the load() function stops responding – Samuel Ramzan Nov 04 '14 at 17:22
  • First make sure that the Error message is really caused by your code, because currently there exists a bug in Chrome that causes this error message simply when you open the console. So: Does the error also show up when you reload your page with console already open? – nothing9 Nov 06 '14 at 11:21

0 Answers0