mirror of
https://github.com/etnguyen03/tjdests.git
synced 2025-04-17 17:00:15 -04:00
29 lines
1.2 KiB
JavaScript
29 lines
1.2 KiB
JavaScript
$(document).ready(function(){
|
|
$("select").each(function(){
|
|
new TomSelect("#" + this.id, {allowEmptyOption: true, "plugins": ["change_listener"]});
|
|
});
|
|
$(function () {
|
|
$('[data-toggle="tooltip"]').tooltip()
|
|
})
|
|
|
|
$("#id_publish_data").change(function () {
|
|
if (this.checked) {
|
|
var confirmreturn = confirm("You have indicated that you wish to publicize the data that you have entered. " +
|
|
"Note that any current and future TJHSST student will be able to view your data. You may unpublish your data at any time.\n\n" +
|
|
"By selecting the affirmative answer below, you declare that all data that you have entered and " +
|
|
"will enter in the future is accurate to the best of your belief. ")
|
|
$(this).prop("checked", confirmreturn)
|
|
}
|
|
})
|
|
|
|
function characterCount() {
|
|
return $("#id_biography").val().length.toString() + "/1500 characters";
|
|
}
|
|
|
|
$("#div_id_biography").append("<small id=\"count\" class=\"form-text text-muted\"></small>");
|
|
$("#count").text(characterCount());
|
|
|
|
$("#id_biography").keyup(function(){
|
|
$("#count").text(characterCount());
|
|
});
|
|
}) |