Created
February 23, 2021 17:18
-
-
Save chered/e65ead2e208be48ba151f653dd0192a8 to your computer and use it in GitHub Desktop.
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
(function($) { | |
// store the image link inside a variable from 'src' attribute | |
var getImageSrc = $('.banner-front-left .fl-post-grid-image img').attr('src'); | |
// add div background image using the variable above | |
$('.banner-front-left .fl-post-grid-image').css('background-image', 'url(' + getImageSrc + ')'); | |
// store the image link inside a variable from 'src' attribute | |
var getImageSrc = $('.banner-top-right .fl-post-grid-image img').attr('src'); | |
// add div background image using the variable above | |
$('.banner-top-right .fl-post-grid-image').css('background-image', 'url(' + getImageSrc + ')'); | |
// store the image link inside a variable from 'src' attribute | |
var getImageSrc = $('.banner-bottom-left .fl-post-grid-image img').attr('src'); | |
// add div background image using the variable above | |
$('.banner-bottom-left .fl-post-grid-image').css('background-image', 'url(' + getImageSrc + ')'); | |
// store the image link inside a variable from 'src' attribute | |
var getImageSrc = $('.banner-bottom-right .fl-post-grid-image img').attr('src'); | |
// add div background image using the variable above | |
$('.banner-bottom-right .fl-post-grid-image').css('background-image', 'url(' + getImageSrc + ')'); | |
$('.banner-front .fl-post-grid-image img').remove(); | |
})( jQuery ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment