Javascript examples for jQuery:CSS
add styles element with value to head
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.js"></script> <script type="text/javascript"> $(function(){// w ww. ja va2 s . c o m $('<style>body { background-color: red; color: white; }</style>').appendTo('head'); }); </script> </head> <body> foo </body> </html>