1 Reply Latest reply on Jun 19, 2012 9:34 AM by Hayden Eastman

    Rhomobile app doesn't load CSS for dynamically written html.

      I'm fairly new to web dev and Rhomobile as well, so forgive me if this isn't a rhomobile specific question.


      I followed this the JQuery Mobile tutorial, then removed my jquery mobile code with simple CSS.  http://docs.rhomobile.com/rhodes-jquerymobile


      Of course, then I also removed the jquery mobile references in the code.  At this point, I have a page with a layout that is created dynamically with javascript then styled with css.  However, it doesn't actually style any of my work.


      When I just load the code into the browser, the page loads fine, so I think I'm at least on the right track.


      My index.erb it just a div for the content (where I dynamically write everything) and my layout.erb is as barebones as possible as well.


      Are there any known problems with respect to loading CSS on dynamic content I should know about?  Alternatively, are there any tips anyone can provide to aid me in debugging?


      *EDIT*: Solved the problem.  Avoid using "document.write" when dynamically writing html from javascript, it does NOT work properly in RhoMobile (or at least didn't for me).  Instead, using jQuery.append allows everything to format correctly.