little man

This commit is contained in:
2013-02-12 08:43:02 -05:00
parent 19e03c4fa0
commit 55aec24710
6 changed files with 23 additions and 5 deletions

View File

@@ -28,7 +28,26 @@ $(document).ready(function() {
});
originalExerciselist = $.getValues("/api/exerciselist");
//*[@id="F_x5F_Pectorals"]
// $('div#SVG1').empty().load("/images/BlankBody.svg", function(){
// console.log('svg loaded');
// });
$('div#SVG1').svg({
loadURL: '/images/BlankBody.svg', // External document to load
onLoad: null, // Callback once loaded
settings: {width: '10cm', height: '5cm'}, // Additional settings for SVG element
initPath: ''});
var colors = "0f0 0ff f60 f0f 00f f00".split(' '), i=0;
$(document).on('click', 'g',(function() {
console.log('click ' + this.id);
this.find('path').style.fill = "#"+colors[i++%colors.length];
})
);
$("button#addExercise").click(function() {
console.log("click!");
@@ -149,6 +168,7 @@ $(document).ready(function() {
});
$("button").button();
$(document).on('click', 'path#F_x5F_Pectorals', function(){alert('hello2');});
});
$("#top").delegate("button.home-link", "click",function() {