Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
Fix Goodie ID in JS (#4126)
Browse files Browse the repository at this point in the history
  • Loading branch information
moollaza authored Apr 24, 2017
1 parent abb63d9 commit 2fc4732
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions share/goodie/geometry/geometry.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
DDH.geometry_goodie = DDH.geometry_goodie || {};
DDH.geometry = DDH.geometry || {};

(function(DDH) {
"use strict";

DDH.geometry_goodie.build = function(ops) {
DDH.geometry.build = function(ops) {
return {
onShow: function() {
onShow: function() {
var formulaSelector = '.geometry-formulas .formula .dot';
var svgSelector = '.geometry-svg *';

$(svgSelector + ',' + formulaSelector).hover(
function() {
// Get Current geoemetry type
Expand All @@ -19,18 +19,18 @@ DDH.geometry_goodie = DDH.geometry_goodie || {};
// JQuery 1.1 cant select SVGs by normal selectors
var svg = document.querySelector(".geometry-svg ." + datatype);
svg.classList.add("hover");


}, function() {
// Remove hovers when not hovering
var datatype = $( this ).data('type');
$('#geometry--goodie .' + datatype).removeClass( "hover" );

var svg = document.querySelector(".geometry-svg ." + datatype);
svg.classList.remove("hover");
}
);
}
};
};
})(DDH);
})(DDH);

0 comments on commit 2fc4732

Please sign in to comment.