Get html - JQuery?

Hi guys

This is my first time learning ajax using jquery.

My get-html.htm:


<!DOCTYPE html>
<html>
<head>
  <style>
  div { font-size:14px; }
  </style>
  <script src="http://code.jquery.com/jquery-1.5.js"></script>
</head>


<body>
<div id="myDiv"></div>	
	
<script>
	$.ajax({
    url: "test.html",
    type: "GET",
    dataType: "html",
    success: function(html)
        {
					$('#myDiv").html(html);
				}
  });		
</script>

</body>
</html>

And my test.html;


<html>
<head>
</head>

<body>
<p>This is from external file, test.html</p>
</body>
</html>

By the way I run this and it did not show anything.
I know this is really very basic, What is the problem with this?
But please consider because I’m really new to jquery/ajax

Thanks in advanced.

Your problem lies with the following line

$('#myDiv").html(html);

You have a single and double quote when it should be 2 single quotes wrapping [B]myDiv

[/B]

$('#myDiv').html(html);

@solidcodes

Recommended references:
jQAPI - Alternative jQuery Documentation
jQuery for Absolute Beginners: The Complete Series | Nettuts+

Aside:
Day 10+

Thanks guys

By the way I already fixed the qoutes problem.
But I still don’t see anthing.

why?

thanks in advanced.

This should work. I just tested on my localhost.

A better solution i would recommend is to use jQuery.load() which uses a silent request to grab the file.