forked from ajaxorg/ace
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclicker.js
More file actions
35 lines (29 loc) · 1.1 KB
/
Copy pathclicker.js
File metadata and controls
35 lines (29 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$(function() {
// when hovering over arrow, add highlight (only if inactive)
$("h3.methodToggle").hover(function () {
if (!$("h3.methodToggle").hasClass('active'))
$(this).addClass("methodToggleHover");
},
function () {
$(this).removeClass("methodToggleHover");
}
);
// after expanding the hidden description, hide the ellipsis
$('.signature-call, .signature-returns', '.signature').click(function() {
var $article = $(this).closest('.article'),
$arrow = $('h3.methodClicker', $article);
if (!$article.hasClass('methodToggleOpen') || this.force) {
$article.addClass('methodToggleOpen');
$arrow.removeClass('inactive').addClass('active');
var data = location.hash = $arrow[0].id.replace(/^js_/, "");
scrollTo(null, data);
}
else {
$article.removeClass('methodToggleOpen');
$arrow.removeClass('active').addClass('inactive');
}
});
$('.related-to', '.metaInfo').click(function(){
location.hash = $(this).find('a').attr('href').split('#')[1];
});
});