| 1 |
// |
| 2 |
// bizstyle.js |
| 3 |
// ~~~~~~~~~~~ |
| 4 |
// |
| 5 |
// Sphinx javascript -- for bizstyle theme. |
| 6 |
// |
| 7 |
// This theme was created by referring to 'sphinxdoc' |
| 8 |
// |
| 9 |
// :copyright: Copyright 2012-2014 by Sphinx team, see AUTHORS. |
| 10 |
// :license: BSD, see LICENSE for details. |
| 11 |
// |
| 12 |
$(document).ready(function(){ |
| 13 |
if (navigator.userAgent.indexOf('iPhone') > 0 || |
| 14 |
navigator.userAgent.indexOf('Android') > 0) { |
| 15 |
$("li.nav-item-0 a").text("Top"); |
| 16 |
} |
| 17 |
|
| 18 |
$("div.related:first ul li:not(.right) a").slice(1).each(function(i, item){ |
| 19 |
if (item.text.length > 20) { |
| 20 |
var tmpstr = item.text |
| 21 |
$(item).attr("title", tmpstr); |
| 22 |
$(item).text(tmpstr.substr(0, 17) + "..."); |
| 23 |
} |
| 24 |
}); |
| 25 |
$("div.related:last ul li:not(.right) a").slice(1).each(function(i, item){ |
| 26 |
if (item.text.length > 20) { |
| 27 |
var tmpstr = item.text |
| 28 |
$(item).attr("title", tmpstr); |
| 29 |
$(item).text(tmpstr.substr(0, 17) + "..."); |
| 30 |
} |
| 31 |
}); |
| 32 |
}); |
| 33 |
|
| 34 |
$(window).resize(function(){ |
| 35 |
if ($(window).width() <= 776) { |
| 36 |
$("li.nav-item-0 a").text("Top"); |
| 37 |
} |
| 38 |
else { |
| 39 |
$("li.nav-item-0 a").text("pplib 0.1 documentation"); |
| 40 |
} |
| 41 |
}); |