Jquery functions and appending elements

scheel

New Member
i am new to jQuery. i am trying to create a function that reads from a xml. i have succeded in creating the function to reads from the xml file. Using the data in the xml, i am trying to creates a toggel menue. here is my code\[code\]<script type="text/javascript">$(document).ready(function() { $.get('newsdata/news.xml', function(d){ $('body').append('<div id="news" data-collapse="accordion"/>'); $(d).find('event').each(function(){ var $event = $(this); var title = $event.attr("title"); var description = $event.find('description').text(); var imageurl = $event.attr('imageurl'); var newcontent = '<h3>'+title+'</h3>'; newcontent+= '<div>'+description+'</div>'; $('#news').append($(newcontent)); //notworking $('.loadingPic').fadeOut(1400); }); alert($('body').html()); });});</script>\[/code\]every thing is working fine. however style sheets are not getting applied. when i take the html conted using \[code\]alert($('body').html())\[/code\]and copy it in another html, its working. however not working when i append. would be helpful if some one can guide me..Thanks in advance
 
Back
Top