diff options
| author | 2014-04-11 09:05:31 +0200 | |
|---|---|---|
| committer | 2014-04-11 09:05:31 +0200 | |
| commit | 6a04683171ecee8fdc5e601b88a1e5c16f8210c4 (patch) | |
| tree | dd309011a9ab028debdc05597d81b1f457a3b4a0 /p/scripts/main.js | |
| parent | c94e893dbb7f5e4fcc58311c563f1b33f3681823 (diff) | |
Revert "Revert "Fix click action on article""
This reverts commit c94e893dbb7f5e4fcc58311c563f1b33f3681823.
Diffstat (limited to 'p/scripts/main.js')
| -rw-r--r-- | p/scripts/main.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 18e1573cf..a7cccc871 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -207,14 +207,10 @@ function mark_favorite(active) { } function toggleContent(new_active, old_active) { - old_active.removeClass("active"); - if (new_active.length === 0) { return; } - old_active.removeClass("current"); - if (does_lazyload) { new_active.find('img[data-original], iframe[data-original]').each(function () { this.setAttribute('src', this.getAttribute('data-original')); @@ -226,9 +222,10 @@ function toggleContent(new_active, old_active) { if (isCollapsed) { new_active.addClass("active"); } + old_active.removeClass("active current"); new_active.addClass("current"); } else { - new_active.toggleClass("current"); + new_active.toggleClass('active'); } var box_to_move = "html,body", |
