JavaScript/jQuery (23) 썸네일형 리스트형 [jQuery] 이미지의 경로와 사이즈 구하기 jQuery - width값 $("div").find("img").each(function() { $(this).load(function(){ var node_wid = $nodeDiv.width(); if(node_wid > 75){ alert(node_wid); } }); }); jQuery - 경로 $("div").find('img').each(function(){ var src = $(this).attr('src'); var none = '../images/common/none.png'; if(src==none){ // }else{ // } }); [jQuery] jQuery를 이용한 이미지 오버효과 CSS .con dl dt { position:relative;} .con dl dt img.on { position:absolute;opacity:0;top:0;left:0;} HTML 첫번째내용 두번째내용 세번째내용 jQuery $(".con dl").hover(function(){ var $this = $(this); var $on = $this.find("img.on"); $on.stop().animate({"opacity":1}, 450, "swing"); $(this).find("dd").css('color','#4a8ef3'); }, function(){ var $this = $(this); var $on = $this.find("img.on"); $on.stop().animate({"opa.. [jQuery] fulldown메뉴 만들기(풀다운) html Menu01 010101 02002020 03033 Menu02 0123 023213 03332 Menu03 01 02 03 css #gnb{padding:10px;} #gnb .p{display:inline-block;height:33px;padding:0 25px;} #gnb .submenu{position:absolute;top:43px;left:0;background:#ccc;width:100%;height:30px;} #gnb .submenu li{display:inline-block;padding:0 25px;line-height:30px;} #gnb .p > a:hover{color: red;} Jquery $(function(){ $("#gnb li").mouseover(funct.. [jQuery] 탭메뉴 만들기 CSS .wrap{width:1000px;} .tab_area{width:100%;} .tab_area ul li{list-style:none;width:33%;height:33px;border-top:1px solid #ccc;border-bottom:1px solid #ccc;background:#efefef;text-align:center;float:left;} .tab_area ul li.t01{border-left:1px solid #ccc;} .tab_area ul li.t02{border-left:1px solid #ccc;border-right:1px solid #ccc;} .tab_area ul li.t03{border-right:1px solid #ccc;} .tab_area ul li.. [jQuery] 자신을 제외한 객체 선택 .not() var obj = $("a"); obj.click(function(){ $(this).addClass("on"); obj.not($(this)).removeClass("on"); }); 예제 A B C D E [jQuery] 특정 객체로 스크롤이동시키기 어떠한 function을 작동했을때 화면에서 벗어나는 경우가 있다. 그럴땐 스크롤을 특정 객체로 이동시켜 한눈에 보기쉽게할때 사용. $("html, body").animate({scrollTop: $("#p_notice").offset().top}, 500); return false; [jQuery] jquery 사용법 소스 상단 head태그 안에 jquery파일을 include시키면 사용가능하다. 방법은2가지이다. http://jquery.com/ 에서 다운받아 서버에올려두고 사용 ?1jquery측 js를 호출한다. jquery-latest.min.js는 최신버전 jquery를 로드 ?1 이전 1 2 3 다음