Permalink
Browse files

changed highlighting to work with appengine load order

  • Loading branch information...
1 parent 63bfc3b commit 99d468988ea31e3a21ecfc6cf2c692dc9d0dc148 @mwittels mwittels committed Jul 9, 2012
Showing with 24 additions and 25 deletions.
  1. +12 −13 exercises/geometry_proofs_1.html
  2. +12 −12 exercises/geometry_proofs_2.html
@@ -259,14 +259,13 @@
for(var line in graph.congruency.lines){
for(var line2 in graph.congruency.lines){
-
- $(function(){
+ (function() {
var $statement = $("."+line+"-"+line2);
var firstLine = graph.congruency.lines[line];
var secondLine = graph.congruency.lines[line2];
if($statement.length > 0){
- $statement.bind("vmouseover", function(event) {
+ $statement.live("vmouseover", function(event) {
firstLine.setHighlighted({
stroke: ORANGE,
"stroke-width": 3
@@ -291,19 +290,19 @@
"stroke-width": 2
});
}
- });
+ })();
}
}
for(var angle in graph.congruency.angles){
for(var angle2 in graph.congruency.angles){
- $(function(){
+ (function(){
var $statement = $("."+angle+"-"+angle2);
var firstAngle = graph.congruency.angles[angle];
var secondAngle = graph.congruency.angles[angle2];
if($statement.length > 0){
- $statement.bind("vmouseover", function(event) {
+ $statement.live("vmouseover", function(event) {
var firstState = firstAngle.state;
var secondState = secondAngle.state;
var maxState = Math.max(firstState,secondState);
@@ -332,18 +331,18 @@
});
});
}
- });
+ })();
}
}
for(var line in graph.congruency.lines){
- $(function(){
+ (function(){
var $statements = $("."+line);
for(var i = 0; i<$statements.length; i++){
var highlightLine = graph.congruency.lines[line];
var highlightDiv = $($statements[i]);
- highlightDiv.bind("vmouseover", function(event) {
+ highlightDiv.live("vmouseover", function(event) {
highlightLine.setHighlighted({
stroke: ORANGE,
"stroke-width": 3
@@ -356,17 +355,17 @@
});
});
}
- });
+ })();
}
for(var line in graph.congruency.lines){
- $(function(){
+ (function(){
var $statements = $("."+line + "2");
for(var i = 0; i<$statements.length; i++){
var highlightLine = graph.congruency.lines[line];
var highlightDiv = $($statements[i]);
- highlightDiv.bind("vmouseover", function(event) {
+ highlightDiv.live("vmouseover", function(event) {
highlightLine.setHighlighted({
stroke: BLUE,
"stroke-width": 3
@@ -380,7 +379,7 @@
});
});
}
- });
+ })();
}
</div>
@@ -589,13 +589,13 @@
for(var line in graph.congruency.lines){
for(var line2 in graph.congruency.lines){
- $(function(){
+ (function(){
var $statement = $("."+line+"-"+line2);
var firstLine = graph.congruency.lines[line];
var secondLine = graph.congruency.lines[line2];
if($statement.length &gt; 0){
- $statement.bind("vmouseover", function(event) {
+ $statement.live("vmouseover", function(event) {
firstLine.setHighlighted({
stroke: ORANGE,
"stroke-width": 3
@@ -611,19 +611,19 @@
});
}
- });
+ })();
}
}
for(var angle in graph.congruency.angles){
for(var angle2 in graph.congruency.angles){
- $(function(){
+ (function(){
var $statement = $("."+angle+"-"+angle2);
var firstAngle = graph.congruency.angles[angle];
var secondAngle = graph.congruency.angles[angle2];
if($statement.length &gt; 0){
- $statement.bind("vmouseover", function(event) {
+ $statement.live("vmouseover", function(event) {
var firstState = firstAngle.state;
var secondState = secondAngle.state;
var maxState = Math.max(firstState,secondState);
@@ -646,18 +646,18 @@
});
});
}
- });
+ })();
}
}
for(var line in graph.congruency.lines){
- $(function(){
+ (function(){
var $statements = $("."+line);
for(var i = 0; i&lt;$statements.length; i++){
var highlightLine = graph.congruency.lines[line];
var highlightDiv = $($statements[i]);
- highlightDiv.bind("vmouseover", function(event) {
+ highlightDiv.live("vmouseover", function(event) {
highlightLine.setHighlighted({
stroke: ORANGE,
"stroke-width": 3
@@ -670,17 +670,17 @@
});
});
}
- });
+ })();
}
for(var line in graph.congruency.lines){
- $(function(){
+ (function(){
var $statements = $("."+line + "2");
for(var i = 0; i&lt;$statements.length; i++){
var highlightLine = graph.congruency.lines[line];
var highlightDiv = $($statements[i]);
- highlightDiv.bind("vmouseover", function(event) {
+ highlightDiv.live("vmouseover", function(event) {
highlightLine.setHighlighted({
stroke: BLUE,
"stroke-width": 3
@@ -693,7 +693,7 @@
});
});
}
- });
+ })();
}
</div>
</div>

0 comments on commit 99d4689

Please sign in to comment.