$(function(){ var ua = navigator.userAgent; if ( ua.indexOf("iPhone") > 0 || ua.indexOf('iPad') > 0 || ua.indexOf('iPod') > 0 ){ //iOS $(window).on("load orientationchange", function() { fs(); }); }else if( ua.indexOf('Android') > 0 ){ //Android $(window).on("load orientationchange resize", function() { fs(); }); } var count = 20; $("ul.slide li a").each(function(){ var txt = $(this).find("p").text(); var txt_len = txt.length; if( txt_len > count ) { $(this).find("p").text(txt.substring(0, count) + ".."); }; }); var count = 20; $("ul.slide li a").each(function(){ var txt = $(this).find("span").text(); var txt_len = txt.length; if( txt_len > count ) { $(this).find("span").text(txt.substring(0, count) + ".."); }; }); }); function fs(){ var target = ".slide01"; var dist = ( $(target).find("li").width() + parseInt( $(target).find("li").css("margin-right") ) ) * 3; var s_num = parseInt( ($(target).find("li").length - 1) / 3 ); Flipsnap(target, { distance: dist, maxPoint: s_num }); target = ".slide02"; dist = ( $(target).find("li").width() + parseInt( $(target).find("li").css("margin-right") ) ) * 3; s_num = parseInt( ($(target).find("li").length - 1) / 3 ); Flipsnap(target, { distance: dist, maxPoint: s_num }); target = ".slide03"; dist = ( $(target).find("li").width() + parseInt( $(target).find("li").css("margin-right") ) ) * 3; s_num = parseInt( ($(target).find("li").length - 1) / 3 ); Flipsnap(target, { distance: dist, maxPoint: s_num }); }