Bootstrap 3 Template
loadsheet test index find.
HTML
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<!--Operating Items-->
<!--Crew-->
<div class="row " style="background-color:#CCCCCC;">
<div class="col-md-12 collapse-group LS-LH-col">
<div class="row collapse">
<div class="col-md-6 ">Description </div>
<div class="col-md-2">Weight (lb) </div>
<div class="col-md-2 ">CG (in) </div>
<div class="col-md-2"></div>
</div>
<div class="row collapse">
<div id="Crews_Description1" class="col-md-6 "> Pilot/Co-Pilot </div>
<div class="col-md-2 ">
<input id="Crews_Weight1" value="390" type="text">
</div>
<div class="col-md-2 ">
<input id="Crews_CG1" value="280" type="text">
</div>
<div class="col-md-2 "> </div>
</div>
<div class="row collapse">
<div id="Crews_Description2" class="col-md-6 "> Flight attd </div>
<div class="col-md-2 ">
<input id="Crews_Weight2" value="390" type="text">
</div>
<div class="col-md-2">
<input id="Crews_CG2" value="280" type="text">
</div>
<div class="col-md-2"> </div>
</div>
<div class="row collapse">
<div id="Crews_Description3" class="col-md-6 "> Crew Baggages </div>
<div class="col-md-2 ">
<input id="Crews_Weight3" value="600" type="text">
</div>
<div class="col-md-2">
<input id="Crews_CG3" value="280.4" type="text">
</div>
<div class="col-md-2"> </div>
</div>
<div class="row collapse">
<div class="col-md-6"> Flight Manual </div>
<div class="col-md-2">
<input id="Crews_Weight4" value="30" type="text">
</div>
<div class="col-md-2 ">
<input id="Crews_CG4" value="360.5" type="text">
</div>
<div class="col-md-2 "> </div>
</div>
<!--Total Crews Items-->
<div class="row">
<div...
CSS
/**{
border:1px solid blue;
}*/
@import url('//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css');
.container-fixed {
bottom: 0;
position: fixed;
left: 0;
right: 0;
top: 0;
}
.width10 {
width: 10%;
}
.width30 {
width: 30%;
}
.width40 {
width: 40%;
}
.row-fixed {
height: 100%;
overflow-y: scroll;
}
.container-fixed .col {
height: 100%;
overflow-y: scroll;
}
.LS-LH-col {
background-color: sand;
height: 100%;
}
.Sub-Total {
background-color: azure;
height: 100%;
}
JavaScript
/* Latest compiled and minified JavaScript included as External Resource */
$(document).ready(function() {
$("[id*='_CG']").addClass("form-control input-sm text-right");
$("[id*='_Weight']").addClass("form-control input-sm text-right");
$("[id*='TXFuelWeight']").addClass("form-control input-sm text-right");
$("[id*='TRPFuelWeight']").addClass("form-control input-sm text-right");
var myindex = GetLSElementIndex("[id*='W_OP_']", "W_OP_CAB1Items");
alert(myindex);
});
// Get the index element in a group of element
function GetLSElementIndex(ElementGroup, Element) {
var setIndex;
$(ElementGroup).each(function(index) {
var someText = $(this).attr('id');
setIndex = index;
if (someText == Element) {
alert(someText);
alert(index);
}
});
return setIndex;
}