views:

21

answers:

1

I am using a keynav plugin that allows me to navigate up and down though a list.

This list is dynamically generated using ajax and mysql. the suggesstions appear when someone begins to search into an input box.

if the user clicks off and the list closes and then begins a new search, when the list is generated the second time, the keyboard navigation breaks. I dont want the page to refresh but is there anyway to "refresh", "reload" the keyvav.js or possibly the function iteself after the user closes the list? so the file loads and hopefully works correctly when the user tries to search again.

 $('body').click(function() {
    $('#suggestions').fadeOut();
     .....do magic "refresh" .....
 });
A: 

Well if it is set up by the a init() function couldnt you just rerun that, but if you really want to reload the whole script you could get the file content with a ajax request then eval() it. not the best way because eval is murder on computers because it reboots the javascript encoder but it will do what you need

kizzie33