JavaScript&Platform/jQuery2013. 1. 18. 13:35

대충 만듬....

<!DOCTYPE>
<HTML>
 <HEAD>
  <TITLE> Div Resize </TITLE>

<script type="text/javascript" src="./js/jquery-1.9.0.min.js"></script>


<style>
div { border : 1px solid #ccc }

#row1 div {
 position: absolute;
}
#row2 div {
 position: absolute;
}

</style>


<script>

$(window).load(function(){ 
 setSize();

});


$(window).resize(function(){ 
 setSize();
});

function setSize() {
 var cellLeft = null;
 var rowHeight = null;
 var rowTop = 0;
    var rowWidth = $('#row1').innerWidth();

 var rowNum = $("#wrapper").children().length;
 var divNum = $("#row1").children().length;

 for ( r = 1; r <= rowNum ; r++ )
 {

  cellLeft = 0;

  $('#row'+r+' .quarter').css({'width':rowWidth/4} ); 
  $('#row'+r+' .half').css({'width':rowWidth/2} );

  for ( i = 1; i <= divNum ; i++ )
  {
   cellWidth = $('#row'+r+' .cell' + i).width();

   $('#row'+r+' .cell'+i).css({left:cellLeft, top: rowTop});

   cellLeft += cellWidth;
  }

  rowHeight = $('#row'+r+' .cell1').height();

  rowTop += rowHeight;

 }
}

</script>

 </HEAD>

 <BODY id ="body">
<div id="wrapper">
 <div id="row1">
  <div class="cell1 quarter">
   <img class="quarter" src="11.jpg">
  </div>
  <div class="cell2 quarter">
   <img class="quarter" src="22.jpg">
  </div>
  <div class="cell3 half">
   <img class="half" src="33.jpg">
  </div>
 </div>
 <div id="row2">
  <div class="cell1 quarter">
   <img class="quarter" src="11.jpg">
  </div>
  <div class="cell2 half">
   <img class="half" src="33.jpg">
  </div>
  <div class="cell3 quarter">
   <img class="quarter" src="22.jpg">
  </div>
 </div>

</div>
 
 
 </BODY>
</HTML>

 

Posted by 비니미니파파
JavaScript&Platform/jQuery2013. 1. 17. 17:50

<script>

$(function(){

 var tabOjb = null;
 var mapObj = null;

 // 탭 li 클릭 시
 $("#tabmenu li").click(function(){
  
  for ( var i=1; i < 5 ; i++ )
  {
   tabOjb = "#tab" + i;   

   var className = $(tabOjb).attr("class"); // object class name

   if ( className == "on" )  // class 가 on 일 경우 만
   {
    $(tabOjb).removeClass("on");
    $("#map"+i).fadeOut(1000);
   }  

   if ( tabOjb == "#"+this.id ) // tab 클릭 시
   {
    $(tabOjb).addClass("on");
    $("#map"+i).fadeIn(1000);
   }
  }
 });
});

</script>

Posted by 비니미니파파
잡담...2013. 1. 8. 09:17

모바일용 우분투가 나왔다....

우분투 모바일로 인해 모바일 생태계 변화가 다시 시작되는건가????

QT/QML 공부해야 하나?????

좀더 지켜보기로... ㅠ.ㅠ

'잡담...' 카테고리의 다른 글

[이벤트] 티스토리 초대장 나눔  (2) 2015.08.04
ios 와 osx 개발을 위한 새로운 언어 swift  (0) 2014.08.06
Posted by 비니미니파파
PHP2012. 11. 30. 10:56

 

한글 매뉴얼에서 함수를 검색해 보자. 좋다... ^^

http://kr1.php.net/manual/kr/index.php

 

Posted by 비니미니파파
WEB 표준(HTML,CSS)2012. 11. 30. 10:55

테이블 row 를 show , hide 시 크롬 , 사파리... 등에서 colspan 적용이 안되는것 같다.

더 기술적으로 파야하지만... 그냥 사용하자...

 function showTblrow( objname  ) {
  var a = document.getElementById( objname );
 
  // display : block 시 IE 만 적용
  // display : table-row 를 적용해야 colspan 적용이 제대로 된다.

  if ( a.style.display == "table-row" ) a.style.display = "none";
  else a.style.display = "table-row";
 }
 </script>

w3c 기술 문서에서 자세하게 나온다

http://www.w3.org/wiki/CSS/Properties/display

Posted by 비니미니파파