달력

42024  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

'Programing/JQUERY'에 해당되는 글 3건

  1. 2020.03.12 SCRIPT 에서 APPEND 한 이벤트 Binding 처리
  2. 2017.11.23 특정 영역(DIV) 여닫기 기능 Toggle
  3. 2017.05.25 DatePicker 기본 설정

$('.부모 이름').on('click', '.걸고 싶은 대상', function() {

넣을 소스;

});



출처: https://cordinghouse.tistory.com/55 [코딩집]

'Programing > JQUERY' 카테고리의 다른 글

특정 영역(DIV) 여닫기 기능 Toggle  (0) 2017.11.23
DatePicker 기본 설정  (0) 2017.05.25
Posted by 한설림
|

<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>

'Programing > JQUERY' 카테고리의 다른 글

SCRIPT 에서 APPEND 한 이벤트 Binding 처리  (0) 2020.03.12
DatePicker 기본 설정  (0) 2017.05.25
Posted by 한설림
|



$("._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" >

'Programing > JQUERY' 카테고리의 다른 글

SCRIPT 에서 APPEND 한 이벤트 Binding 처리  (0) 2020.03.12
특정 영역(DIV) 여닫기 기능 Toggle  (0) 2017.11.23
Posted by 한설림
|