-
-
Save JARVIS-AI/b04bd7da23fe0ec1f0f69520d3e682c3 to your computer and use it in GitHub Desktop.
How to set an !important css property in javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() | |
| var target = createElement( '<a class="target" href="javascript:;" title="Share this at Diaspora*">Diaspora Share Button</a>' );; | |
| if (noDataURI == 1) { | |
| target.setAttribute( 'background-image', 'url( ' + imagesPath + 'diaspora-share-button.png ) !important' ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Test navigator</title> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| </head> | |
| <body> | |
| <script type="text/javascript" src="bg-image.js"></script> | |
| <body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment