Skip to content

Commit

Permalink
Dev: Fixed issue : javascript error without #index
Browse files Browse the repository at this point in the history
Dev: test if #index and #index .row.current exist before manipulation

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@11044 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Shnoulle committed Sep 27, 2011
1 parent f311d6e commit 2df6c6b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/survey_runtime.js
Expand Up @@ -109,10 +109,12 @@ $(document).ready(function()
});
}
}
// #index
var idx = $("#index");
var row = $("#index .row.current");
idx.scrollTop(row.position().top - idx.height() / 2 - row.height() / 2);
// #index ???
if ($("#index").size() && $("#index .row.current").size()){
var idx = $("#index");
var row = $("#index .row.current");
idx.scrollTop(row.position().top - idx.height() / 2 - row.height() / 2);
}
});

gmaps = new Object;
Expand Down

0 comments on commit 2df6c6b

Please sign in to comment.