JQuery 를 사용하면서, 자주 쓰이고 제일 유용한것들(?) 정리..
아마 이정도면 JQuery 로 왠만한건 구현 가능할듯?
//초기 실행 $(document).ready(function() { init(); })
//onclick 설졍 $('id').click( function(){ alert('click!!'); })
//onchange 설졍 $('id').change( function(){ alert('click!!'); })
//CSS변경 $('id').css('style', 'attribute');
//첫번째 tr를 빼고 전부 삭제 $('someTableSelector tr:not(:first)').remove();
//select 세팅 $("id option[value=Apple]").attr("selected", "true");
//selected 값 $("id :selected").val()
//table 안에 tr추가 $('id').append( $('<tr></tr>').html('<td>JQuery</td>');
//swfobject 플러그인 사용. $('#flashcontent').flash( { swf: 'fla/cp.swf', width: 820, height: 250, flashvars: { name1: 'jQuery', name2: 'SWFObject', name3: 'Plugin'
} } );
//
 ( 0)  ( 0) "HTML / CSS / JavaScript" 카테고리의 다른 글 |
Leave your greetings.