Performing a basic AJAX request, but when the HTML is displayed no HTML links work and now CSS:hover elements work either.
Confused as to what I've done wrong. Here's an example of the code below.
CSS:
li:hover{ background:red; }
a{ text-decoration:none; }
a:hover{ text-decoration:underline; }
HTML (index.php):
<script>
$(document).ready(function(){
ajax();
});
</script>
<ul class="loadhere"></uL>
loadthis.php:
<li><a href="">Example</a></li>
JS (AJAX):
function ajax(){
$.ajax({
type:"POST",
url:"http://example.com/loadthis.php",
dataType: "html"
})
.done(function(result){
$('ul.loadhere').html(result);
});
}