Cannot change style of HTML elements using jQuery by content script
- by Moctava Farzán
I'm writing an extension for chrome as "Content script". My extension should change the background color of google home page (https://www.google.com)
I wrote this code (including jquery):
$(".gsib_a").style="background:#FF0000";
But not worked. I'm sure I added jQuery to content script, and the manifest.json file is set. I am sure because this code works:
$(".gsib_a").hide();
And I am sure changing style of the element with class of gsib_a is exactly what I need and affects. Because I've tested it by Chrome Developer Tools.
Okay, who knows the problem?