반응형 jquery2 jQuery > .on() on() API 문서 https://api.jquery.com/on/ .on() | jQuery API Documentation Description: Attach an event handler function for one or more events to the selected elements. The .on() method attaches event handlers to the currently selected set of elements in the jQuery object. As of jQuery 1.7, the .on() method provides all function api.jquery.com 1. on(event, handler) $(selector).on("click", function.. 2023. 5. 8. [Jquery]이미지 불규칙 정렬 플러그인 BlockSit, marsonry 오늘 알려드릴 jqeury 플러그인은 Blocksit와 marsonry입니다. 둘다 이미지를 정렬시켜주는 스크립트입니다. BlockSit 우선 블록 시트는 이미지를 보여줄 영역을 블럭화하여 이미지를 정렬해줍니다. 위 이미지는 BlockSit를 이용해 코딩한 화면입니다. 4블록으로 나누어 이미지를 쌓도록 옵션을 설정하여 4줄로 보여주고 있지요 함수형태로 코드를 짜면 아래와 같도록 나옵니다. var col = 4; var xmg = 8; var ymg = 8; function block_sit(parent, node, col = 4, xmg = 8, ymg = 8){ $(parent).BlocksIt({ numOfCol: col, offsetX: xmg, offsetY: ymg, blockElement: n.. 2019. 6. 25. « 1 » 반응형