x
</html>
<html>
<head>
<h1>Budget Performance as Edited by James </h1>
</head>
<div class="b">
<div class="b-header">
<h2 class="b-title" contenteditable> Template Table </h2>
<em class="b-size">Budget: <span contenteditable>800</span>KB</em>
</div><!--end b-header-->
<div class="b-budget">
<div class="b-cat-container">
<em class="actual-size">Actual: <span>60</span>KB</em>
<ul class="b-cat-list">
<li class="b-cat b-cat-html">
footer {
margin-top: 4em;
color: #d5c9a5;
text-align: center;
a {
color: #d5c9a5;
&:hover, &:focus {
color: #EF944D;
}
}
}
@keyframes shake {
10%, 90% {
transform: translate3d(-1px, 0, 0);
}
20%, 80% {
transform: translate3d(2px, 0, 0);
}
30%, 50%, 70% {
transform: translate3d(-4px, 0, 0);
x
});
}
//Set Actual Size
function setActualSize(scope,val) {
actualSize = val;
scope.find('.actual-size span').text(val);
}
//Determine if actual size is within budget
function budgetOverUnder(scope) {
var budgetSize = parseInt(scope.find('.b-size span').text());
var actualSize = parseInt(scope.find('.actual-size span').text());
var totalSize = actualSize/budgetSize;
//If actual val is over budget
if(totalSize>1) {
scope.find('.b-header, .actual-size').addClass('has-error');
scope.find('.b-cat-container').width('100%');
} else {
scope.find('.b-header, .actual-size').removeClass('has-error');
scope.find('.b-cat-container').width(totalSize*100+'%');
}
Also see: Tab Triggers