$(document).ready(function() { gernatemobilelist(); }); function init(){ var height = $(".dashijilist .end").offset().top-$(".dashijilist .start").offset().top+20; //$(".dashijilist").height(height); var height = $(".dashijilistmobile .end").offset().top-$(".dashijilistmobile .start").offset().top+20; //$(".dashijilistmobile").height(height); } function autoposition(){ if(document.body.clientwidth<1220){ $(".lileft").each(function(){ //$(this).find("img").prependto($(this)); //$(this).removeclass("lileft").addclass("liright"); }) } } $(window).load(function() { init(); }); $(window).resize(function() { autoposition(); }); function gernatemobilelist(){ $(".dashijilist li:gt(0)").each(function(){ if($(this).hasclass("end")){ return; } var htmldate = $.getouterhtml($(this).find(".date")); var imgsrc = $(this).find(".logp").attr("src").replace(/.png/g, "m.png"); var logoimgsrc = ""; var htmlleftarrrow=""; var htmlconetnt = $.getouterhtml($(this).find(".licontent")); var htmltotal = "
"+ htmldate+logoimgsrc+htmlleftarrrow+"
"; // console.log(htmltotal); // $(".dashijilistmobile").append(htmltotal); $(".listmobilecontent").append("
" + htmlconetnt + htmltotal + "
"); }) var end ="
  • "; $(".dashijilistmobile").append(end); }