| 1 |
(function ($) { |
| 2 |
|
| 3 |
var $fcgiButton = $('#fastcgi-settings-button'), |
| 4 |
$fcgiClose = $('#fastcgi-settings-close'), |
| 5 |
$fcgiSettings = $('#fastcgi-settings'); |
| 6 |
|
| 7 |
// show/hide page cache settings |
| 8 |
$fcgiButton.on('click', function (e) { |
| 9 |
$(this).toggleClass('active'); |
| 10 |
|
| 11 |
if ($(this).hasClass('active')) { |
| 12 |
$fcgiSettings.slideDown('fast'); |
| 13 |
} else { |
| 14 |
$fcgiSettings.slideUp('fast'); |
| 15 |
} |
| 16 |
}); |
| 17 |
|
| 18 |
// close page cache settings |
| 19 |
$fcgiClose.on('click', function (e) { |
| 20 |
$fcgiButton.removeClass('active'); |
| 21 |
$fcgiSettings.slideUp('fast'); |
| 22 |
}); |
| 23 |
|
| 24 |
// Remove page cache notice after 2 seconds |
| 25 |
if ($('#fly-page-cache-notice').length) { |
| 26 |
setTimeout(function () { |
| 27 |
$('#fly-page-cache-notice').fadeOut('slow'); |
| 28 |
}, 2000); |
| 29 |
} |
| 30 |
|
| 31 |
})(jQuery); |
| 32 |
|