Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- img_berita.src = '/img/{{ $home->berita_background }}';
- img_berita.onload = function() {
- agenda_position_y = berita_position_y + (((screen.width / this.width) * this.height) - gap);
- img_agenda.src = '/img/{{ $home->agenda_background }}';
- img_agenda.onload = function() {
- sejarah_position_y = agenda_position_y + (((screen.width / this.width) * this.height) - gap);
- img_sejarah.src = '/img/{{ $home->sejarah_background }}';
- img_sejarah.onload = function() {
- tentang_position_y = sejarah_position_y + (((screen.width / this.width) * this.height) - gap);
- img_tentang.src = '/img/{{ $home->tentangkami_background }}';
- img_tentang.onload = function() {
- berita_position_y2 = tentang_position_y + (((screen.width / this.width) * this.height) - gap);
- img_berita2.src = '/img/{{ $home->berita_background }}';
- img_berita2.onload = function() {
- agenda_position_y2 = berita_position_y2 + (((screen.width / this.width) * this.height) - gap);
- img_agenda2.src = '/img/{{ $home->agenda_background }}';
- img_agenda2.onload = function() {
- sejarah_position_y2 = agenda_position_y2 + (((screen.width / this.width) * this.height) - gap);
- img_sejarah2.src = '/img/{{ $home->sejarah_background }}';
- img_sejarah2.onload = function() {
- tentang_position_y2 = sejarah_position_y2 + (((screen.width / this.width) * this.height) - gap);
- img_tentang2.src = '/img/{{ $home->tentangkami_background }}';
- img_tentang2.onload = function() {
- $('#konten').css({
- 'background-image': 'url("' + img_berita.src + '"), url("' + img_agenda.src + '"), url("' + img_sejarah.src + '"), url("' + img_tentang.src + '"), url("' + img_berita2.src + '"), url("' + img_agenda2.src + '"), url("' + img_sejarah2.src + '"), url("' + img_tentang2.src + '")',
- 'background-position-x': '0px, 0px, 0px, 0px',
- 'background-position-y': berita_position_y + 'px, ' + agenda_position_y + 'px, ' + sejarah_position_y + 'px, ' + tentang_position_y + 'px, ' + berita_position_y2 + 'px, ' + agenda_position_y2 + 'px, ' + sejarah_position_y2 + 'px, ' + tentang_position_y2 + 'px',
- 'background-repeat': 'no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat',
- 'background-size': 'contain, contain, contain, contain, contain, contain, contain, contain'
- });
- };
- };
- };
- };
- };
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement