Implementing CSS in jQuery
Assuming that one is developing a web application which is sufficiently
non-intensive that overhead is not a concern. Is it reasonable to
implement CSS solely in Javascript/jQuery and completely abandon external
css files?
$('<div/>').attr({'id':'special_box'}).addClass('little_box').appendTo('body')
$('<div/>').addClass('little_box').appendTo('body')
$('<div/>').addClass('little_box').appendTo('body')
...
$('.little_box').css({'color':'red'})
$('#special_box').css({'color':'blue'})
Is there anybody advocating this complete conflation? Is there anything
that completely prevents it or makes it evidently unreasonable?
No comments:
Post a Comment