Demo

Developer
Size
2,793 Kb
Views
12,144

How do I make an demo?

What is a demo? How do you make a demo? This script and codes were developed by Tyler Grace on 28 November 2022, Monday.

Demo Previews

Demo - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Demo</title> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="list-frame"> <ul> <li>Introduction to Cultural Anthropology</li> <li>Discoveries in Archaeology </li> <li>Language and Culture </li> <li>Introduction to Physical Anthropology </li> <li>Ancient New World Civilization <span class="label label-primary">Writing</span></li> </ul>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.16/d3.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Demo - Script Codes CSS Codes

.node { cursor: pointer;
}
.node circle { fill: #fff; stroke: steelblue; stroke-width: 1.5px;
}
.node text { font: 10px sans-serif;
}
.link { fill: none; stroke: #ccc; stroke-width: 1.5px;
}
#list-frame { float: right; margin-top: 10%; margin-right: 45%; margin-left: -30%;
}

Demo - Script Codes JS Codes

var treeData = [ { "name": "Anthopology", "parent": "null", "children": [ { "name": "Anthopology Majors", "children": [ { "name": "Major Requirements" }, { "name": "Health Professions Concentration" }, { "name": "Southeastern Archaeology Concentration" } ] }, { "name": "Anthopology Minor" } ] }
];
// ************** Generate the tree diagram *****************
var margin = {top: 20, right: 120, bottom: 20, left: 120},	width = 960 - margin.right - margin.left,	height = 500 - margin.top - margin.bottom;
var i = 0;
var tree = d3.layout.tree()	.size([height, width]);
var diagonal = d3.svg.diagonal()	.projection(function(d) { return [d.y, d.x]; });
var svg = d3.select("body").append("svg")	.attr("width", width + margin.right + margin.left)	.attr("height", height + margin.top + margin.bottom) .append("g")	.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
root = treeData[0];
update(root);
function update(source) { // Compute the new tree layout. var nodes = tree.nodes(root).reverse(), links = tree.links(nodes); // Normalize for fixed-depth. nodes.forEach(function(d) { d.y = d.depth * 180; }); // Declare the nodes… var node = svg.selectAll("g.node") .data(nodes, function(d) { return d.id || (d.id = ++i); }); // Enter the nodes. var nodeEnter = node.enter().append("g") .attr("class", "node") .attr("transform", function(d) { return "translate(" + d.y + "," + d.x + ")"; }); nodeEnter.append("circle") .attr("r", 10) .style("fill", "#fff"); nodeEnter.append("text") .attr("x", function(d) { return d.children || d._children ? -13 : 13; }) .attr("dy", ".35em") .attr("text-anchor", function(d) { return d.children || d._children ? "end" : "start"; }) .text(function(d) { return d.name; }) .style("fill-opacity", 1); // Declare the links… var link = svg.selectAll("path.link") .data(links, function(d) { return d.target.id; }); // Enter the links. link.enter().insert("path", "g") .attr("class", "link") .attr("d", diagonal);
}
function click(d) { if (d.children) { d._children = d.children; d.children = null; } else { d.children = d._children; d._children = null; } update(d);
}
Demo - Script Codes
Demo - Script Codes
Home Page Home
Developer Tyler Grace
Username thgraceUA
Uploaded November 28, 2022
Rating 3
Size 2,793 Kb
Views 12,144
Do you need developer help for Demo?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Tyler Grace (thgraceUA) Script Codes
Name
ADHC Calendar
A Pen by Tyler Grace
Static Image
Create amazing marketing copy with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!