I'm currently developing a Web-Application.
Now I'm wondering what's better in Performance or maybe other aspects to construct the Page.
First option, construct everything directly in a HTML File and hide the Objects () for later use and let JavaScript show/hide them when needed.
Second option, create a JavaScript which generates the HTML at Runtime via JQuery.
EDIT
To get a little more specific.
It's gonna be a Web-Application with many different Views. For example, at first you have Login-View, then Overview-View, Settings-View, etc.
All Requests like Login, GetData is gonna managed with AJAX JSON-RPC Requests.
If I go the HTML way, I would create for each View a div-Block which is from beginning not shown. JavaScript is then going to show them depending on what's needed and fills out Data via AJAX Requests.
If I go the JavaScript way, JavaScript generates the HTML and the Views get's replaced by JavaScript.
I'd like to do it this way, because I do not want the user to reload every Site. And I don't like PHP.
add/removeClass().