【仕事用メモ】
iPhoneやiPadはiframeに対応していないので伸びてしまう。
どうしても仕様上iframeを使わないといけない場合は、head内に下記のコードを埋め込めばヌルヌルスクロールが出来る。
iframe要素を<div></div>で括るのを忘れずに!
【サンプルコード】 <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.js"></script> <script type="text/javascript"> $(function(){ if (/iPhone|iPod|iPad/.test(navigator.userAgent)) $('iframe').wrap(function(){ var $this = $(this); return $('<div />').css({ width: $this.attr('width'), height: $this.attr('height'), overflow: 'scroll', '-webkit-overflow-scrolling': 'touch' }); }); }) </script>
0