Created
August 28, 2017 14:28
-
-
Save dotriz/b3ecb51ee7268a847f29a21dcc8a0935 to your computer and use it in GitHub Desktop.
Allows you to change favicon of your webpage at run time using jquery
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 change_favicon(new_favicon_path) | |
| { | |
| $('link[rel="shortcut icon"]').remove(); | |
| $('head').append('<link id="favicon" href="'+ new_favicon_path +'" rel="shortcut icon" type="image/png" />'); | |
| } | |
| change_favicon('/paht/to/favicon.png'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment