mirror of
https://github.com/bodyrep/DemoApp.git
synced 2026-01-25 22:51:37 +00:00
deprecated jquery-svg, using jquery+inline SVG
This commit is contained in:
@@ -34,18 +34,20 @@ $(document).ready(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: ''});
|
||||
// $('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;
|
||||
|
||||
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];
|
||||
$(this).children('path').css("fill",'#'+colors[i++%colors.length] +'');
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user