Last active
June 9, 2016 09:38
-
-
Save alexvas123/1a39cbc6bd0476642a288726247ef481 to your computer and use it in GitHub Desktop.
Slide Content
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
// SLIDE CONTENT | |
$('.buttons > img').on('click', function() { | |
var title = $(this).attr('data-title'); | |
var name = $(this).attr('data-show'); | |
var file = name + '.html'; | |
$('.screen').children().fadeOut(300, function() { | |
$('.screen').load(file); | |
$('.serial-title').empty().removeClass('abfab downton blackbooks blackadder office fools').append(title).addClass(name); | |
}); | |
}); | |
// SLIDE CONTENT END | |
$("h3:contains('Текст')").on('click', function() { | |
var name = $(this).parents('nav').siblings('.screen').attr('title'); | |
var file = name + '-text.html'; | |
var screen = $(this).parents('nav').siblings('.screen'); | |
$('.screen').children().fadeOut(500, function() { | |
$(this).detach(); | |
}), $(screen).load(file).hide().delay(300).fadeIn(500); | |
}); | |
$("h3:contains('Видео')").on('click', function() { | |
var name = $(this).parents('nav').siblings('.screen').attr('title'); | |
var file = name + '-video.html'; | |
var screen = $(this).parents('nav').siblings('.screen'); | |
$('.screen').children().fadeOut(500, function() { | |
$(this).detach(); | |
}), $(screen).load(file).hide().delay(300).fadeIn(500); | |
}); | |
$('.pepperslogo').on('click', function() { | |
var screen = $(this).parents('nav').siblings('.screen'); | |
$(screen).children().fadeOut(500, function() { | |
$(this).detach(); | |
}); | |
}) | |
// SLIDE CONTENT | |
$('.buttons > img').on('click', function() { | |
var title = $(this).attr('data-title'); | |
var name = $(this).attr('data-show'); | |
var file = name + '.html'; | |
$('.screen').load(file, function() { | |
$(this).hide().fadeIn(1000); | |
$('.serial-title').empty().removeClass('abfab downton blackbooks blackadder office fools').append(title).hide().addClass(name).fadeIn(2000); | |
}); | |
if($(window).width() < 768) { | |
$('.screen').css('padding-bottom', '0%'); | |
} else { | |
$('.screen').css('padding-bottom', '60%'); | |
}; | |
}); | |
// SLIDE CONTENT END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment