Browse Source

Fix jquery selecting error.

tags/v1.0^2
Benjamin Attal 10 years ago
parent
commit
7f63adfb31
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      static/js/index.js

+ 2
- 2
static/js/index.js View File

@@ -212,8 +212,8 @@ function createResult(codelet) {


var cur_match = 0; var cur_match = 0;
$(newDiv).click(function(e) { $(newDiv).click(function(e) {
var $match = $('#match_' + cur_match),
$code = $('#tablecontainer');
var $code = $(this).find('#tablecontainer'),
$match = $code.find('#match_' + cur_match);


$code.scrollTop($code.scrollTop() - $code.height() / 2 + $code.scrollTop($code.scrollTop() - $code.height() / 2 +
$match.position().top + $match.height() / 2); $match.position().top + $match.height() / 2);


Loading…
Cancel
Save