0

The following code works fine in firefox but not in chrome.. I'm not so familiar with jquery so please help me.

The ultimate aim is to change the content of a div with class="change" dynamically

$(function(){
    $("#content").load("consulting.html");
  });
$(".change").click(function(){
  var page=$(this).attr('href');
  $("#content").load(page);
  return false;

});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
     
BSK
  • 61
  • 1
  • 4

2 Answers2

0

You can try launching chrome / chromium with --allow-file-access-from-files flag set.

See https://askubuntu.com/questions/160245/how-do-i-make-the-google-chrome-flag-allow-file-access-from-files-permanent

Chandra Kumar
  • 4,127
  • 1
  • 17
  • 25
0

there is 3 possible answer:

  • use --allow-file-access-from-files option

  • use --disable-web-security option (not good option)

  • use '127.0.0.1' instead of 'localhost'

for how to use option on chrome see website!

erfan mehraban
  • 483
  • 3
  • 5
  • 13