본문 바로가기

Front-End/jQuery11

[jQuery] .not() : 특정 Element를 제외한 나머지 Element 선택하기 정의: .not(selector)은 선택한 요소 중 특정 선택자를 제외한 요소를 선택합니다. 참고 http://api.jquery.com/not/https://www.codingfactory.net/10333 2018. 9. 9.
[jQuery] attr(), prop() 차이점 jQuery1.6에서 attr()에서 하던 처리를 attr(), prop()로 나누었습니다. 원래는 따로 만들었어야 하는 기능이였지만 같이 사용하는 문제로 버그가 많아졌다고 합니다. javascript에서 attr()과 prop()는 다른 것이지만 jQuery 1.6 이전에는 .attr() 메서드가 일부 속성을 검색 할 때 속성 값을 고려하기 때문에 이를 같은 것 처럼 사용하고 있었습니다. 때문에 일관성없는 동작이 발생할 수 있었습니다. 아래 이미지는 jQuery API Documentation 에서 찾은 결과입니다. 1. attr() 메서드- HTML의 속성(attribute)을 취급합니다. - HTML으로서 기록되어 있는 속성의 내용(attribute 값)을 설정하거나 리턴(string 값)합니다. .. 2018. 8. 18.
[jQuery] Selector 1. #idjavascript = document.getElementById('intro') DOCTYPE html> Welcome to My Homepage My name is Donald. I live in Duckburg. document.getElementById('intro').style.backgroundColor = 'yellow'; jQuery : $('#intro') DOCTYPE html>$(document).ready(function(){ $('#intro').css('background-color', 'yellow');});Welcome to My HomepageMy name is Donald.I live in Duckburg. 2. .classjavascript : document.. 2018. 8. 5.