Created
June 12, 2015 21:21
-
-
Save natejacobson/de66b4613d909e17fda1 to your computer and use it in GitHub Desktop.
Background Data to Style for WSU Spine Parent Theme
This file contains 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( $ ){ | |
process_section_backgrounds = function() { | |
var $bg_sections = $('.section-wrapper-has-background'); | |
$bg_sections.each( function() { | |
var background_image = $(this).data('background'); | |
$(this).css('background-image', 'url(' + background_image + ')' ); | |
}); | |
}; | |
$(document).ready( function() { | |
process_section_backgrounds(); | |
}); | |
}(jQuery, window)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment