OMG, what an oversight.. /blush sorry for bugging you. I am currently converting old scripts to jquery.. I must have gone blind in doing that thanks anyway for pointing me to it.
Juergen On 8 Sep., 19:14, JuergenRiemer <[EMAIL PROTECTED]> wrote: > Hi, > > I have an HTML document, that I write into a div element. this works > fine, yet when I try to access the the inserted elements viajQuery > selectors I cant. > > here the main html document, the div where I input the html document > viajqueryrespectively > <div id='thesView'>empty</div> > > here the html (database.html) document I insert: > <div class='left'>eins</div> > <div class='left'>zwei</div> > <div class='left'>drei</div> > > and here myjavascript, the part that is commented out does work.. I > can add events to theajaxcontent, yet $('#thesView > div') does > not.. do I overlook something here??? > > thx a lot > > test = { > dRoot : null, > load : function(){ > var oThis = this; > $('#thesView').load('database.html', '', oThis.afterLoad()); > }, > afterLoad : function(){ > this.addBehaviour() > }, > addBehaviour : function(){ > $('#thesView > div').click(function(){ > alert('click') > }) > // $('div').click(function(){ > // alert('this works!!!!!') > // }) > } > > } > > jQuery(function() { > test.load() > > }