blender/doc/python_api/blender-org/static/jquery.sidebar.js
Luca Bonavita 996efebbe3 == python api doc ==
First commit to make some structure in doc/ directory.

- moved source/blender/python/doc -> doc/python_api
- moved source/gameengine/PyDoc/*.rst -> doc/python_api/rst
- modified accordingly sphinx_doc_gen.py and sphinx_doc_gen.sh
  (later on I'll try alternative/ scripts by neXyon as promised :)
- source/gameengine/PyDoc/ is still there because contains epydoc stuff for the bge, will ask more and look into it later
2010-10-13 10:42:33 +00:00

27 lines
918 B
JavaScript

$(document).ready(function () {
var top = $('.sphinxsidebarwrapper').offset().top - parseFloat($('.sphinxsidebarwrapper').css ('marginTop').replace(/auto/, 0));
var colheight = parseFloat($('.sphinxsidebarwrapper').css('height').replace(/auto/, 0));
$(window).scroll(function (event) {
// what the y position of the scroll is
var y = $(this).scrollTop();
// whether that's below the form
if (y >= top) {
//colheight is checked and according to its vaule the scrolling
//is triggered or not
if (colheight <= window.innerHeight) {
// if so, ad the fixed class
$('.sphinxsidebarwrapper').addClass('fixed');
} else {
// otherwise remove it
$('.sphinxsidebarwrapper').removeClass('fixed');
}
} else {
// otherwise remove it
$('.sphinxsidebarwrapper').removeClass('fixed');
}
});
});