| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- $(function(){
- // debugger;
- try{
- console.log("1111111111");
- $(".longCardList-div td").each(function(){
- //debugger;
- if ($(this).find('.longCardList-thumbnail').length>0) {//有图片的情况下
- var tdW = $(this).width();
- var thumbnailW = $(this).find(".longCardList-thumbnail").width();
- var infoW = parseInt(tdW- thumbnailW -18 - 76);
- $(this).find('.longCardList-info').width(infoW);
- var thisH = $(this).height();
- var infoH = $(this).find('.longCardList-info').height();
- var imgH = $(this).find('.longCardList-thumbnail').height();
- if (imgH>infoH) {
- var top = parseInt(imgH-infoH);
- $(this).find('.longCardList').css("margin-top",top+"px");
- }else if(imgH<infoH){
- var marginTop = (infoH - imgH)/2;
- $(this).find('.longCardList-thumbnail').css("margin-top",marginTop+"px");
- }
- // $(this).find(".change-button").height(thisH).css("line-height",thisH);
- }else{
- // 2019.5.21修改这个eles里面的内容
- if(window.ActiveXObject || "ActiveXObject" in window) {
- var tdW = $(".longCardList-div").width();
- //没图片的情况下
- $(this).find('.longCardList-info').width(tdW - 85);
- console.log('ie')
- }else {
- var tdW = $(this).width();
- //没图片的情况下
- $(this).find('.longCardList-info').width(tdW - 85);
- console.log('no ie')
- }
-
- }
-
- var thisH = $(this).height();
- // $(this).find('.button-change').css("height",thisH);
- // $(this).find('.button-revise').css("height",thisH);
- // $(this).find('.button-enable').css("height",thisH);
- // $(this).find('.button-reason').css("height",thisH);
- // $(this).find('.button-recruit').css("height",thisH);
- $(this).find(".button").css({
- "line-height":thisH + 22 +"px",
- "height":thisH
- });
- if (thisH<45) {
- // $(this).find('.lbutton').css({
- // "font-size":"0px",
- // "background-position-y":"center",
- // "height":"36px",
- // "line-height":"36px"
- // })
- $(this).find('.button').css({
- "font-size":"0px",
- "background-position-y":"center",
- "height":"36px",
- "line-height":"36px"
- })
- }
- });
- $(".ellipsisDiv").css({"text-overflow": "ellipsis","overflow": "hidden","-webkit-line-clamp": "2","-webkit-box-orient": "vertical","display": "-webkit-box"});
-
- }catch(e){
- console.log(e);
- }
- });
|