210901 오늘은 제이쿼리로 완벽하진 않지만, navigation 동작과 탭메뉴, 메인 배너 슬라이드의 기본적인 원리에 대해서 학습했다.
let bannerNum = 0;
let bookW = $('body > section').width();
$('body > section').bind('orientationchange', function(e) {
$('book_frame').stop().animate({'left':-bookW * bannerNum}, 300);
});
// in mobile
$('body > section').bind('swipeleft', function() {
$('.next').trigger('click'); // trigger()를 사용해 클릭한 것처럼 강제로 이벤트 발생 하도록
});
$('body > section').bind('swiperight', function() {
$('.prev').trigger('click');
});