initial commit of Catalyst skeleton app
[scpubgit/stemmatology.git] / TreeOfTexts / root / js / interaction.js
diff --git a/TreeOfTexts/root/js/interaction.js b/TreeOfTexts/root/js/interaction.js
new file mode 100644 (file)
index 0000000..42af732
--- /dev/null
@@ -0,0 +1,8 @@
+function color_nodes( arr_node_ids ) {
+  $('ellipse').attr( {stroke:'black', fill:'#fff'} );
+  jQuery.each( arr_node_ids, function(index,value) {
+    $('.node').children('title').filter( function(index) {
+      return $(this).text() == value;
+    }).siblings('ellipse').attr( {stroke:'red', fill:'yellow'} );;
+  });
+}