tags:

views:

71

answers:

1

hi guys,

This is my first time here so go easy with me. I am keen on mastering codeignter and jquery for web app dev. I have made progress but I am at a point I was hoping I would pick on your great minds over.

I have links where I click and they fill up a div with content and this works but I use the $.ajax({}); not get or post or load. now the thing I noticed and I know it's not new is anything i try to do with jquery on the fetched content does not work. so even if I do a console.log() to try and catch a click event on a submit button nothing happens. The form just moves away from the page currently being worked on. So my question is what are noobs to do in this instance? is it a setting or an option? Thanks for all the help

God Bless

+4  A: 

You need to use live() to bind functions to events for elements that get added after page load. Basically, live() will bind code to events firing on all existing and future elements that match a certain selector.

code_burgar
dude,your answer was spot on. I suspected the answer was close. Thanks a million.God bless.
Eagletrophy