diff options
| author | 2014-10-01 13:55:30 +0200 | |
|---|---|---|
| committer | 2014-10-01 13:55:30 +0200 | |
| commit | 405f23050b18e8388edb6f8be90aa59c17ada421 (patch) | |
| tree | 73126bc15d48c6d73175c4907fe6d30f9d4b5505 /p/scripts | |
| parent | f400621f44c2aac0b1bb4204e95e4c35a8a35f8f (diff) | |
Design of the slider
See https://github.com/marienfressinaud/FreshRSS/issues/646
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 7fed7a819..925a93650 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1241,7 +1241,8 @@ function faviconNbUnread(n) { } function init_slider_observers() { - var slider = $('#slider'); + var slider = $('#slider'), + closer = $('#close-slider'); if (slider.length < 1) { return; } @@ -1252,7 +1253,6 @@ function init_slider_observers() { } ajax_loading = true; - var url_slide = $(this).attr('href'); $.ajax({ @@ -1261,12 +1261,18 @@ function init_slider_observers() { data : { ajax: true } }).done(function (data) { slider.html(data); - slider.show(); + closer.addClass('active'); + slider.addClass('active'); ajax_loading = false; }); return false; - }) + }); + + closer.on('click', function() { + closer.removeClass('active'); + slider.removeClass('active'); + }); } function init_all() { |
