Skip to content

Instantly share code, notes, and snippets.

Draggable.create("svg", {
type: "rotation",
// throwProps: true,this will require a lisence
});
$('.slice path').click(function(e){
$('.slice path').css('fill', '#F3EAFE');
$(this).css('fill', '#D3C4E4');
var sliceID = $(this).parents('.slice').attr('id');
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<!--SID: R.A-->
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title><page-title></page-title>
</title>
<meta-data></meta-data>
<theme-css></theme-css>
</head>
body {
background: red;
}
@interfacecreation
interfacecreation / segment_via_js
Last active December 10, 2015 23:19
Just a little snippet to check for segments in the url and add a switch statement to add classes.
$(document).ready (function() {
// Get segments and store in variables
var newURL = window.location.protocol + "://" + window.location.host + "/" + window.location.pathname;
var pathArray = window.location.pathname.split( '/' );
var segment_1 = pathArray[1];
// switch cases depending on the url segment and add an active class
switch (segment_1){