$(document).ready(function() {
var $jointlist, $joint_map, default_options, mapsterConfigured;
//$toolTipList = $('#hidden_divs');
$jointlist = $('#jointlist');
$joint_map = $('#ProximalSesamoid');
function getFullCheckBoxID(item) {
var checkBoxName = item.attr('name');
var checkBoxId = item.attr('id');
var subType;
if (checkBoxId.indexOf("_Mild") >= 1) {
subType = "_Mild"
} else if (checkBoxId.indexOf("_Comminuted") >= 1) {
subType = "_Comminuted"
}
return checkBoxName + subType;
}
function setMapsterArea(selectedInputs, name) {
selected = selectedInputs.length > 0;
$joint_map.mapster('set', selected, name);
}
function doCheckBoxAreaAction(chkBox, checked) {
var fullID = getFullCheckBoxID(chkBox);
var checkBoxName = chkBox.attr('name');
var listCheckbox = $jointlist.find('#jl_' + fullID);
listCheckbox.attr('checked', checked);
setMapsterArea($('#' + checkBoxName + '_divID').find('input:checked'), checkBoxName);
}
function setToolTipCheckBoxEvent(data) {
// Get the two checkboxes within the
var checkBoxes = data.toolTip.find('input');
checkBoxes.each(function() {
var span = $(this).parent().find('span');
span.unbind('click').bind('click', function(e) {
var chk = $(this).parent().find('input');
var isChecked = chk.is(':checked');
// want to do opposite of what the check box is
// set the checkbox
chk.attr('checked', !isChecked);
doCheckBoxAreaAction(chk, !isChecked);
});
var ttName = $(this).attr('name');
var checkBoxId = getFullCheckBoxID($(this));
var listCheckbox = $jointlist.find('#jl_' + checkBoxId);
if (listCheckbox.attr('name') == ttName) {
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.