$(function(){ setTimeout(function(){//画像サイズレスポンシブ例外 $('#main img').each(function(index, element) { if(!$(this).hasClass('notautophotowidth')){ var maxwidth=$(this).width(); var maxheight=$(this).height(); $(this).css({'width':'100%','max-width':maxwidth,'height':'auto','max-height':maxheight}); } }); },300); }); $(function(){ //$('footer').gpFloatX(); /* $('article section:first-child').addClass('firstsection') $('article section:last-child').addClass('lastsection'); $('nav a').on({'mouseleave touchend mouseup':function(){ $(this).css('background','#69DC4F'); },'touchstart mousedown':function(){ $(this).css('background','#43A826'); },'mouseenter':function(){ $(this).css('background','#65C53E'); }}); */ /* var movieObject = $("#movie01"); $(document).on('click','.vvv',function(){ var id = $(this).attr('id'); var iframeHTML = ''; movieObject.html(iframeHTML); $('#nowbgcolor').html('#id_'+id+'{background-color:#ccc;}') return false; }); */ $('nav ul li').each(function(i) { $(this).addClass('navli'+i); }); $('img').each(function(index, element) { if(!$(this).hasClass('notautophotowidth')){ var maxwidth=$(this).width(); $(this).css({'width':'100%','max-width':maxwidth,'height':'auto'}); } }); $('#mailformlink_img').on({'mouseover':function(){ $(this).attr('src','image/mailformlink_o.png'); },'mouseout':function(){ $(this).attr('src','image/mailformlink.png'); }}); //★リンク付き画像のホバー // ホバーさせたい画像に // クラス「hover_js_banner」をつける // ※なお、DOM操作によって後に追加された要素には対応しない $('.hover_js_banner').each(function(){ $(this).wrap('
'); }); $('.hover_js_banner').on({'mouseover':function(){ //旧バージョン /*var src = $(this).attr('src'); $(this).data('imgsrc',src).attr('src',src.replace(/(\.gif|\.jpg|\.png)/g,'_o$1'));*/ //新バージョン $(this).parent().css({'opacity':'0.5'}) },'mouseout':function(){ //旧バージョン /*var src = $(this).data('imgsrc'); $(this).attr('src',src);*/ //新バージョン $(this).parent().css({'opacity':'1.0'}) }}); });