-
Notifications
You must be signed in to change notification settings - Fork 0
/
safe2.js
1 lines (1 loc) · 2.53 KB
/
safe2.js
1
$(function(){var t,a,e=$(window),s=($("html"),$("body"),$("main"),$("#l-header")),o=($("#l-footer"),$(".bottom-group"),$(".pack-nav"),$(".campaign-bnr")),r=($("#l-loading"),$("#l-pagetop")),i=(s.height(),e.scrollTop(),"is-active"),n=$(".js-change-txt__trigger"),g=$(".js-change-txt2__trigger"),l=$(".js-change-txt__target"),d=$(".js-change-txt2__target"),c=$(".js-change-font__trigger"),h=$(".js-change-font2__trigger"),_=$(".js-change-font__target"),p=$(".js-change-font2__target");if(0<$(".js-parallax").length){var f=$(".js-parallax").get(0),v=new Parallax(f),j=$(".about"),m=$(".hero"),u=$(".lineup-banner"),w=scrollMonitor.create(j,{top:-200}),x=scrollMonitor.create(u);r.attr("data-pagetop-status","hidden"),w.enterViewport(function(){s.addClass("is-enable"),m.addClass("is-hidden"),o.addClass("is-show"),v.disable(),r.attr("data-pagetop-status","show")}),w.exitViewport(function(){w.isAboveViewport?(s.addClass("is-enable"),m.addClass("is-hidden"),o.addClass("is-show"),v.disable(),r.attr("data-pagetop-status","show")):(s.removeClass("is-enable"),m.removeClass("is-hidden"),o.removeClass("is-show"),v.enable(),r.attr("data-pagetop-status","hidden"))}),x.enterViewport(function(){o.removeClass("is-show")}),x.exitViewport(function(){x.isAboveViewport?o.removeClass("is-show"):o.addClass("is-show")}),t=$(".js-change-txt__trigger option:selected").data("preset"),a=$(".js-change-txt2__trigger option:selected").data("preset"),$(".js-change-font__trigger").val(t),$(".js-change-font2__trigger").val(a),$(".js-switch-mode").each(function(){$(this);var e=$(".js-switch-mode__trigger li"),s=$(".js-switch-mode__target");e.on("click",function(){var t=$(this),a=s.attr("data-tester-mode");e.removeClass(i),t.addClass(i),"color"==a?s.attr("data-tester-mode","comic"):s.attr("data-tester-mode","color")})}),n.on("change",function(){var t=$(this).val(),a=$(".js-change-txt__trigger option:selected").data("preset");l.text(t),l.css("font-family","'"+a+"'"),FONTPLUS.reload(!0),$(".js-change-font__trigger").val(a)}),g.on("change",function(){var t=$(this).val(),a=$(".js-change-txt2__trigger option:selected").data("char"),e=$(".js-change-txt2__trigger option:selected").data("preset"),s=$(".js-change-txt2__trigger option:selected").data("fukidashi");d.html(t),d.css({"font-family":"'"+e+"'",height:a+"em"}),d.attr("data-fukidashi",s),FONTPLUS.reload(!0),$(".js-change-font2__trigger").val(e)}),c.on("change",function(){var t=$(this).val();_.css("font-family","'"+t+"'"),FONTPLUS.reload(!0)}),h.on("change",function(){var t=$(this).val();p.css("font-family","'"+t+"'"),FONTPLUS.reload(!0)})}});