Html with jQuery load ()

1

I'm trying to use this function of Jquery but it is not working correctly because it does not show me anything.

<script>
$("#minha_div").load("Noticias.html");
</script>

 <div id="minha_div" width="550" height="400"  style="position: absolute; left: 1%; top: 39%;"></div>

The console appears:

  

XMLHttpRequest can not load. (File path) Cross origin   requests are only supported for protocol schemes: http, data, chrome,   chrome-extension, https, chrome-extension-resource.

    
asked by anonymous 18.03.2015 / 12:20

1 answer

1

Use jQuey Ajax:

$.ajax({ 
     url: "Noticias.html", dataType: "html" 
}).done(function( responseHtml ) {
     $("#minha_div").html(responseHtml);
});
    
18.03.2015 / 12:43