We will show you how to create individual banners on each page that can be controlled through the shopify cms. We cover how to setup the javascript and how to use it.


Prerequisites

  • Using the Template Editor
  • Installing Jquery from google API library
  • Installing a custom javascript file

Setup

Supporting Jquery Code

$(document).ready(function() {
    	$("img.feature").hide();
		var $source = $("img.feature").attr("src");
		$('#feature-image').css({
			'backgroundImage': 'url(' + $source +')',
			'backgroundRepeat': 'no-repeat',
            'border-top': '3px solid #E4E4E4',
            'border-bottom': '3px solid #E4E4E4'
		});

Usage

Leave a Reply

You must be logged in to post a comment.