Files
LeafWeb/WebCms/scripts/site.js
T
2020-01-16 10:26:20 -05:00

40 lines
839 B
JavaScript

(function($) {
// disable anchors in menu links which are disabled
$("li.disabled a").click(function () {
return false;
});
$("form.confirm").submit(function () {
var form = this;
var text = "Confirm";
var confirmMsg = $(form).attr("confirm-msg");
if (confirmMsg) {
text = confirmMsg;
}
$("<div>" + text + "</div>")
.dialog({
title: "Confirm", // title
buttons: {
"Confirm": function () {
form.submit();
},
"Cancel": function () {
$(this).dialog("close");
}
}
});
return false;
});
$(".read-more")
.click(function () {
var control = $(this).attr('readcontrol');
$("#" + control).toggleClass("read-less");
if ($(this).text() === "Show Less")
$(this).text("Show More");
else
$(this).text("Show Less");
return false;
});
})(jQuery);