Skip to content

Instantly share code, notes, and snippets.

@jeremyfelt
Created April 16, 2015 20:49
Show Gist options
  • Save jeremyfelt/ded76824cd3382e2a32b to your computer and use it in GitHub Desktop.
Save jeremyfelt/ded76824cd3382e2a32b to your computer and use it in GitHub Desktop.
Process section backgrounds
(function($,window){
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