Bug? Unable to manipulate jQuery written HTML.
I'm using jQuery to make ajax requests and return HTML, which then
gets inserted into the document using val(), in order to build a form
on-the-fly. The problem is that I need to manipulate the HTML that has
been written into the page using ajax. I am unable to count the li
elements that I have inserted, using:
site_options_array = $("#site_list_dropdown").find("li").get();
site_options = site_options_array.length;
jQuery is unable to find the newly created list elements using:
$("#site_list_dropdown").find("li").hover(function() { ...
I know the code works as I also use it with non-generated HTML, so
either it's a bug or this is a feature that should be implemented, in
my opinion. Is there something I can do in order to work around the
issues?
Many thanks to any help on the subject. It's quite important to me.