$('.부모 이름').on('click', '.걸고 싶은 대상', function() {
넣을 소스;
});
출처: https://cordinghouse.tistory.com/55 [코딩집]
'Programing > JQUERY' 카테고리의 다른 글
특정 영역(DIV) 여닫기 기능 Toggle (0) | 2017.11.23 |
---|---|
DatePicker 기본 설정 (0) | 2017.05.25 |
$('.부모 이름').on('click', '.걸고 싶은 대상', function() {
넣을 소스;
});
출처: https://cordinghouse.tistory.com/55 [코딩집]
특정 영역(DIV) 여닫기 기능 Toggle (0) | 2017.11.23 |
---|---|
DatePicker 기본 설정 (0) | 2017.05.25 |
<script type="text/javascript">
$(function() {
$('#ma-search-toggle').click(function(e) {
e.preventDefault();
var $toggle = $('div.box > .box-comments');
if ($toggle.is(':visible')) {
$(this).switchClass('fa-chevron-circle-up', 'fa-chevron-circle-down'); //클래스 변경
$('div.box > .box-comments').slideUp(); // 슬라이드 업 [닫힘]
} else {
$(this).switchClass('fa-chevron-circle-down', 'fa-chevron-circle-up'); //클래스 변경
$('div.box > .box-comments').slideDown(); // 슬라이드 업 [열림]
};
});
});
</script>
<i class="fa fa-chevron-circle-up" id="ma-search-toggle" style="cursor: pointer;"></i>
<div class="box-body box-comments" style="padding-bottom: 0">
닫히고 열리고
</div>
SCRIPT 에서 APPEND 한 이벤트 Binding 처리 (0) | 2020.03.12 |
---|---|
DatePicker 기본 설정 (0) | 2017.05.25 |
$("._datePicker").datepicker({
prevText: '이전 달',
nextText: '다음 달',
monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
monthNamesShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
dayNames: ['일', '월', '화', '수', '목', '금', '토'],
dayNamesShort: ['일', '월', '화', '수', '목', '금', '토'],
dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
// showMonthAfterYear: true,
yearSuffix: '년',
showOn: "button",
buttonImage: "img/calendar.gif",
buttonImageOnly: true,
buttonText: "Select date",
regional : 'ko',
autoSize : true,
changeMonth : true,
changeYear : true ,
altFormat : 'yy-mm-dd',
dateFormat : 'yy-mm-dd',
showButtonPanel : true,
beforeShow: function() {
setTimeout(function() {
$("#ui-datepicker-div").before(
"<iframe id='ui-datepicker-div-bg-iframe' frameborder='0' scrolling='no' style='filter:alpha(opacity=0); position:absolute;"
+ "left: " + $("#ui-datepicker-div").css("left") + ";"
+ "top: " + $("#ui-datepicker-div").css("top") + ";"
+ "width: " + $("#ui-datepicker-div").outerWidth(true) + "px;"
+ "height: " + $("#ui-datepicker-div").outerHeight(true) + "px;'></iframe>");
}, 20);
},
onSelect : function( dateText, inst ) {
$(this).removeClass('placeholdersjs');
},
onClose: function() {
clearPlaceholder();
$("#ui-datepicker-div-bg-iframe").remove();
}
});
<input class="_datePicker " id="searchDate" name="searchDate" placeholder="Date" >
SCRIPT 에서 APPEND 한 이벤트 Binding 처리 (0) | 2020.03.12 |
---|---|
특정 영역(DIV) 여닫기 기능 Toggle (0) | 2017.11.23 |