Created
March 28, 2013 14:28
-
-
Save JGrubb/5263555 to your computer and use it in GitHub Desktop.
Dart wallpaper JS code
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
jQuery(document).ready(function($) { | |
var _abm_bg_config = _abm_bg || {}; | |
_abm_bg_config.bg_url = 'url(http://heartprintseducation.files.wordpress.com/2012/06/new-background-test.jpg)'; | |
_abm_bg_config.click_url = '%chttp://www.google.com'; | |
var _abm_bg = document.createElement('div'); | |
var _abm_bg_link = document.createElement('a'); _abm_bg_link.href = _abm_bg_config.click_url; _abm_bg_link.target = "_blank"; | |
var _abm_bg_link_node = document.createElement('p'); _abm_bg_link_node.textContent = 'testing'; _abm_bg_link.insertBefore(_abm_bg_link_node); | |
var offset = $('#columns').offset(); | |
_abm_bg_link_node.style.display = 'none'; | |
_abm_bg_link.style.width = '100%'; | |
_abm_bg_link.style.height = '100%'; | |
_abm_bg_link.style.position = 'absolute'; | |
_abm_bg_link.style.top = offset.top + 'px'; | |
_abm_bg_link.style.backgroundColor = 'transparent'; | |
_abm_bg.insertBefore(_abm_bg_link); | |
var d = document.getElementsByTagName('div')[0]; d.parentNode.insertBefore(_abm_bg, d); | |
document.body.style.position = 'relative'; | |
document.body.style.backgroundImage = _abm_bg_config.bg_url; | |
document.body.style.backgroundRepeat = 'no-repeat'; | |
document.body.style.backgroundPosition = 'center ' + offset.top + 'px'; | |
document.body.style.backgroundAttachment = 'fixed'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment