How to apply events to items that I add to page?
For example, I am using ajax and a bunch of code to generate a list that is dynamically generated. This part is working perfectly, however I can't seem to remove any items from said list (since they didn't exist when document.ready fired).
How would I go about having a function that could remove items from my list?
(tried declaring something like hideItem(){ $(this).parent('li').hide(); } and calling it in the onclick event of the removal link, but it says the function doesn't exist... Ideas?)