Commit 5cef95cf authored by Smari McCarthy's avatar Smari McCarthy
Browse files

Show value on hover

parent cc95e8af
...@@ -14,7 +14,7 @@ function Marka(target) { ...@@ -14,7 +14,7 @@ function Marka(target) {
} }
this.match(); this.match();
this.doConversions(); // this.doConversions();
} }
Marka.prototype.match = function() { Marka.prototype.match = function() {
...@@ -59,6 +59,7 @@ Marka.prototype.doConversions = function() { ...@@ -59,6 +59,7 @@ Marka.prototype.doConversions = function() {
} else { } else {
var node = $(value); var node = $(value);
node.data("original_value", node.text()); node.data("original_value", node.text());
var children = node.children()
self.getValueInSetCurrency(res.number, res.symbol, function(value, converted) { self.getValueInSetCurrency(res.number, res.symbol, function(value, converted) {
if (converted) { if (converted) {
console.log(self.getCurrentCurrency()) console.log(self.getCurrentCurrency())
...@@ -66,6 +67,9 @@ Marka.prototype.doConversions = function() { ...@@ -66,6 +67,9 @@ Marka.prototype.doConversions = function() {
} else { } else {
node.text(node.data("original_value")) node.text(node.data("original_value"))
} }
node.append(children);
node.children(".marka-results").html("<span class=\"marka-result\">" + node.data("original_value") + "</span>")
}) })
} }
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment