Created
June 1, 2015 14:48
-
-
Save AlphaNerd/2a7b152b21e6b012dcec to your computer and use it in GitHub Desktop.
Basic header image swap script. Select target graphic and destination using CSS selectors.
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
var target = ".target div img"; | |
var dest = "#header_img"; | |
var link = jQuery(target).attr("src"); | |
console.log(link); | |
jQuery(dest).css("backgroundImage","url('+link+')"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment