Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgiehl <stefan@piwik.org>2015-03-27 20:42:04 +0300
committersgiehl <stefan@piwik.org>2015-03-27 20:42:04 +0300
commit36bb21dd554d823b1b4e023c7379ecaeecbaead2 (patch)
tree93901b13331d84d6c585dd4ef740db27b1bc568a /plugins/CoreHome/javascripts/sparkline.js
parent36afb2fe416aa95763f2dfe64509465ee0057d90 (diff)
use closest instead of parents
Diffstat (limited to 'plugins/CoreHome/javascripts/sparkline.js')
-rw-r--r--plugins/CoreHome/javascripts/sparkline.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/CoreHome/javascripts/sparkline.js b/plugins/CoreHome/javascripts/sparkline.js
index 21176163ec..18f5ca74d1 100644
--- a/plugins/CoreHome/javascripts/sparkline.js
+++ b/plugins/CoreHome/javascripts/sparkline.js
@@ -70,8 +70,8 @@ window.initializeSparklines = function () {
// if this happens, we can't find the graph using $('#'+idDataTable+"Chart");
// instead, we just use the first evolution graph we can find.
if (dataTable.length == 0) {
- if ($(this).parents('.widget').length) {
- dataTable = $(this).parents('.widget').find('div.dataTableVizEvolution');
+ if ($(this).closest('.widget').length) {
+ dataTable = $(this).closest('.widget').find('div.dataTableVizEvolution');
} else {
dataTable = $('div.dataTableVizEvolution');
}