code below for a simple auto suggest box... however when I click a suggestion from the list it doesn't return the contents to the input box like it should. It doesn't recognize anything from the loaded html at all?
JQUERY
$(document).ready(function(){
$('#edit-name').keyup(function() {
if ($(this).val().length >= 3) {
bname = $(this).val();
$("#searchframe").load("searchresults.php", { 'name[]': [name] });
} else {
$("#searchframe").html('');
}
});
$('.bus').click(function() {
alert("testing"); // <-- nothing happens!
$('#edit-name').val($(this).html());
});
});
HTML
...
...
...
...
INJECTED HTML