PageSourceSearch

https://registrationform.jgu.edu.in/js/global.js

js jgu.edu.in collected 2026-09-24 08:47:51 UTC 4,142 bytes, 139 lines download raw bytes

1(function ($) {
2    'use strict';
3    try {
4        $('.js-datepicker').daterangepicker({
5            "singleDatePicker": true,
6            "showDropdowns": true,
7            "autoUpdateInput": false,
8            endDate: "today",
9            locale: { format: 'DD-MM-YYYY' },
10        });
11        var myCalendar = $('.js-datepicker');
12        var isClick = 0;
13        $(window).on('click', function () {
14            isClick = 0;
15        });
16        $(myCalendar).on('apply.daterangepicker', function (ev, picker) {
17            isClick = 0;
18            $(this).val(picker.startDate.format('DD-MM-YYYY'));
19        });
20        $('.js-btn-calendar').on('click', function (e) {
21            e.stopPropagation();
22            if (isClick === 1)
23                isClick = 0;
24            else if (isClick === 0)
25                isClick = 1;
26
27            if (isClick === 1) {
28                myCalendar.focus();
29            }
30        });
31
32        $(myCalendar).on('click', function (e) {
33            e.stopPropagation();
34            isClick = 1;
35        });
36        $('.daterangepicker').on('click', function (e) {
37            e.stopPropagation();
38        });
39    } catch (er) {
40        console.log(er);
41    }
42
43    try {
44        var selectSimple = $('.select-dropdown');
45        selectSimple.each(function () {
46            $(this).select2();
47        });
48    } catch (err) {
49        console.log(err);
50    }
51
52    $('#gender').on("change", function() {
53        let selectedGender = $('#gender :selected').text();
54
55        if(selectedGender == 'Prefer not to say') {
56            $("#other-gender").show();
57            $("#gender").hide();
58        } else {
59            $("#other-gender").hide();
60            $("#gender").show();
61        }
62    });
63
64    $('#religion').on("change", function() {
65        let selected = $('#religion :selected').text();
66        if(selected == 'If Other(Please Specify)') {
67            $("#other-religion").show();
68            $("#religion").hide();
69        } else {
70            $("#other-religion").hide();
71            $("#religion").show();
72        }
73    });
74
75    $('#category').on("change", function() {
76        let selected = $('#category :selected').text();
77        if(selected == 'If Other(Please Specify)') {
78            $("#other-category").show();
79            $("#category").hide();
80        } else {
81            $("#other-category").hide();
82            $("#category").show();
83        }
84    });
85
86    $('#guardian').on("change", function() {
87        let selected = $('#guardian :selected').text();
88        if(selected == 'Others') {
89            $("#other-guardian").show();
90            $("#guardian").hide();
91        } else {
92            $("#other-guardian").hide();
93            $("#guardian").show();
94        }
95    });
96
97    $('.clear-other-item').on("click", function(){
98        let fieldValue = this.getAttribute('data-item');
99        $(`#${fieldValue}`).show();
100        $(`#${fieldValue}`).val('');
101        $(`#other_${fieldValue}`).val('');
102        $(`#other-${fieldValue}`).hide();
103    });
104
105    $('#others_scholar_scheme').click(function() {
106
107        if(($(this).val()=="other_scholorship") && ($(this).is(':checked'))) {
108            $('#scholarship_scheme_upload').show();
109            $('#scholarship_scheme_other').show();
110        } else {
111            $('#scholarship_scheme_upload').hide();
112            $('#scholarship_scheme_other').hide();
113        }
114    });
115
116    $('#others_level_exam_appear').click(function() {
117
118        if(($(this).val()=="Others") && ($(this).is(':checked'))) {
119            $('#level_exam_appear_upload').show();
120            $('#level_exam_appear_other').show();
121        } else {
122            $('#level_exam_appear_upload').hide();
123            $('#level_exam_appear_other').hide();
124        }
125    });
126
127    $('#others_award_certification').click(function() {
128
129        if(($(this).val()=="other_activities") && ($(this).is(':checked'))) {
130            $('#award_certification_upload').show();
131            $('#award_certification_other').show();
132        } else {
133            $('#award_certification_upload').hide();
134            $('#award_certification_other').hide();
135        }
136    });
137
138
139})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.