Merge remote-tracking branch 'adv/author-info'

This commit is contained in:
OzzieIsaacs
2017-07-23 13:36:50 +02:00
8 changed files with 145 additions and 8 deletions
+16
View File
@@ -2,6 +2,20 @@ var displaytext;
var updateTimerID;
var updateText;
// Generic control/related handler to show/hide fields based on a checkbox' value
// e.g.
// <input type="checkbox" data-control="stuff-to-show">
// <div data-related="stuff-to-show">...</div>
$(document).on("change", "input[type=\"checkbox\"][data-control]", function () {
var $this = $(this);
var name = $this.data("control");
var showOrHide = $this.prop("checked");
$("[data-related=\""+name+"\"]").each(function () {
$(this).toggle(showOrHide);
});
});
$(function() {
function restartTimer() {
@@ -121,6 +135,8 @@ $(function() {
});
});
$("input[data-control]").trigger("change");
$(window).resize(function(event) {
$(".discover .row").isotope("reLayout");
});