Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function updateImage() {
- if (pic == 1) {
- caption = "GO BEYOND EARTH";
- }
- else if (pic == 2) {
- caption = "EXPLORE NEW WORLDS";
- }
- else if (pic == 3) {
- caption = "EXPERIENCE DEEP SPACE";
- }
- $('.pic-titles').text(caption);
- $('.center').css('background-image', 'url(img/space' + pic + '.jpg');
- pic++;
- if (pic > 3) {
- pic = 1;
- }
- }
- });
Add Comment
Please, Sign In to add comment