Skip to content

Commit c01fa8f

Browse files
committed
Modify tooltip
1 parent d512f27 commit c01fa8f

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

latest/_static/default.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,9 @@ div.tooltip {
429429
color: White;
430430
position: absolute;
431431
left: 35%;
432-
top: -25%;
432+
top: 10%;
433433
z-index: 1000000;
434-
width: 65%;
434+
width: 60%;
435435
border-radius: 5px;
436436
border-style: solid;
437437
border-color: #3d5b25;

latest/index.html

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@
3939
success: function(data){
4040
var lines = data.split("\n");
4141
$.each(lines, function(n, elem) {
42-
if (elem != ""){
42+
if(n == (lines.length - 1)) {
43+
$('#version-list li a.latestversion').append('<div class="tooltip"><p>Latest version</p></div>');
44+
}
45+
else if (elem != ""){
4346
var res = elem.split(":");
4447
if(n == (lines.length - 2)){
4548
$("#version-list").prepend("<li><a class='latestversion' style='font-size:100%;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
@@ -55,12 +58,6 @@
5558
}
5659
});
5760

58-
$("#bottom-list").hover(function () {
59-
$('#version-list li a.latestversion').append('<div class="tooltip"><p>Latest version</p></div>');
60-
}, function () {
61-
$('#version-list li a.latestversion div').remove();
62-
});
63-
6461
$('#popupmenu li.has-sub').on('click', function(){
6562
if ($('li.has-sub').hasClass('open')) {
6663
$('li.has-sub').removeClass('open');

0 commit comments

Comments
 (0)