TypeError: $(...).style is undefined - bug or my fault?
css, firefox, javascript, jquery
Solution
you are mixing javascript with jquery.
In jquery you have to use css() to make it work like this:
$("#gallery-container").css("background","black");
Problem
I first wanted only to change the background of one element but then this came across: `TypeError: $(...).style is undefined` (in the Firefox Console) HTML: ``` <!DOCTYPE html> <html lang="DE"> <head> <meta charset="utf-8"/> <title>Laura Sack - Offizielle Webseite</title> </head> <body> <div id="gallery-container" class="gallery-container cf"></div> <script src="js/jquery.js"></script> <script src="js/main.js"></script> </body> </html> ``` Javascript: ``` $(document).ready(function(){ $("#gallery-container").style.background = "black"; }); ```