debian-mirror-gitlab/app/assets/javascripts/behaviors/details_behavior.js

22 lines
584 B
JavaScript
Raw Normal View History

2016-09-13 17:45:13 +05:30
(function() {
$(function() {
$("body").on("click", ".js-details-target", function() {
var container;
container = $(this).closest(".js-details-container");
return container.toggleClass("open");
});
2016-09-29 09:46:39 +05:30
// Show details content. Hides link after click.
//
// %div
// %a.js-details-expand
// %div.js-details-content
//
2016-09-13 17:45:13 +05:30
return $("body").on("click", ".js-details-expand", function(e) {
$(this).next('.js-details-content').removeClass("hide");
$(this).hide();
return e.preventDefault();
});
});
}).call(this);