By Dylan Barber on
2/3/2010 10:42 AM
With jQuery and CSS becoming so much more the norm for web development it becomes even more necessary to be able to manipulate classes on elements not in the skin, specifically the body tag.
There are really two ways to do this and each has it benefits and problems, jQuery and inline code.
Jquery: This method is so simple simply add $('#Body').addClass('MyNewClass')in the skin and it will add whatever class to the body tag, in DNN the id of the body tag is ‘Body’. The only problem with this method is if you are depending on that class being there even if jQuery fails to run you are out of luck.
Inline Code: the method uses a simple bit of inline vb.net code to add the class to the body tag