2 ms·
Instead of generating markup on the server side, generate it on the client side. Why? 1) The client side knows more about the client (screen width, device, scr
by aakilfernandes 14y ago
Instead of generating markup on the server side, generate it on the client side. Why?
1) The client side knows more about the client (screen width, device, scroll position)
2) Save yourself an AJAX call
3) Make your code more modular by templating jQuery and HTML at the same time. I plan on writing a whole blog post about this, but currently writing web apps seems to follow 1)Create DOM, 2) find relevant DOM with jQuery, 3) apply jQuery. This will combine steps 1 and 3 into the same template, and make 2 unnecessary.