Skip to content

Instantly share code, notes, and snippets.

View sdkester's full-sized avatar

Shaun Kester sdkester

View GitHub Profile
// prepare the form when the DOM is ready
$(document).ready(function() {
// Setup the ajax indicator
$('body').append('<div id="ajaxBusy"><p><img src="images/loading.gif"></p></div>');
$('#ajaxBusy').css({
display:"none",
margin:"0px",
paddingLeft:"0px",
$(document).ready( function() {
$('.chkOptions').click(
function () {
var ntot = 0;
$('.chkOptions:checked').each(function () {
ntot += parseInt($(this).val());
});
$('#txtSavingsTot').val(ntot);
})
.change();
$(document).ready( function() {
$('#ClickWordList li').click(function() {
$("#txtMessage").insertAtCaret($(this).text());
return false
});
$("#DragWordList li").draggable({helper: 'clone'});
$(".txtDropTarget").droppable({
accept: "#DragWordList li",
drop: function(ev, ui) {
$(this).insertAtCaret(ui.draggable.text());
$(function() {
$("ul.droptrue").sortable({
connectWith: 'ul',
opacity: 0.6,
update : updatePostOrder
});
$("#sortable1, #sortable2").disableSelection();
$("#sortable1, #sortable2").css('minHeight',$("#sortable1").height()+"px");
updatePostOrder();
$(document).ready( function() {
$('.chkOptions').click(
function () {
var ntot = 0;
$('.chkOptions:checked').each(function () {
ntot += parseInt($(this).val());
});
$('#txtSavingsTot').val(ntot);
})
.change();
$('table.zebra thead > tr:first-child()').addClass('zSelected');
$('table.zebra tbody > tr:nth-child(odd)').addClass('zOdd');
$('table.zebra tbody > tr:nth-child(even)').addClass('zEven');