Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function() {
- $('.section').each(function() {
- var imgurl = $(this).find('img').attr('src');
- $(this).html('').css({
- 'width' : '100%',
- 'heihgt' : '600px',
- 'background-image' : 'url(' + imgurl + ')',
- 'background-position' : '50% 50%',
- 'background-size' : 'cover',
- 'background-repeat' : 'no-repeat'
- });
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement