Skip to content

Instantly share code, notes, and snippets.

@natejacobson
Created June 12, 2015 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natejacobson/de66b4613d909e17fda1 to your computer and use it in GitHub Desktop.
Save natejacobson/de66b4613d909e17fda1 to your computer and use it in GitHub Desktop.
Background Data to Style for WSU Spine Parent Theme
(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