Template:Biomod/2013/Aarhus/Nano Creators/Begin: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
No edit summary
No edit summary
 
(38 intermediate revisions by the same user not shown)
Line 46: Line 46:
margin-left: 200px;
margin-left: 200px;
padding-left: 12px;
padding-left: 12px;
padding-right: 20px;
padding-right: 35px;
}
}


Line 138: Line 138:
/auto/, 0));
/auto/, 0));
var nav = $('#tocScrol');
var nav = $('#tocScrol');
var stopper = $('#indexing');
var max = $('#indexing').offset().top - nav.height();
var maxTop = stopper.offset().top - stopper.height() + nav.height();


$(window).scroll(
$(window).scroll(function(event) {
function(event) {
// what the y position of the scroll is
// what the y position of the scroll is
var y = $(this).scrollTop();
var y = $(this).scrollTop();


// whether that's below the form
if (y > top) {
if (y <= maxTop) {
// && signs are html decoded thus this construction
if (y >= top) {
if (y >= max) {
// if so, ad the fixed class
nav.removeClass('fixed');
nav.addClass('fixed');
nav.css({
addPoss('1: y:' + y + ' top:' + top
position : 'absolute',
+ " maxTop:" + maxTop);
top : max - top
nav.removeAttr('style');
});
} else {
} else {
nav.removeClass('fixed');
nav.addClass('fixed');
addPoss('1.1: y:' + y + ' top:' + top
nav.removeAttr('style');
+ " maxTop:" + maxTop);
}
nav.removeAttr('style');
} else {
}
nav.removeClass('fixed');
} else if (y >= maxTop) {
nav.removeAttr('style');
nav.removeClass('fixed');
}
nav.css({
});
position : 'absolute',
top : maxTop
});
addPoss('2: y:' + y + ' top:' + top
+ " maxTop:" + maxTop);
} else {
// otherwise remove it
nav.removeClass('fixed');
nav.removeAttr('style');
addPoss('3: y:' + y + ' top:' + top
+ " maxTop:" + maxTop);
}
});
});
});
function addPoss(msg) {
$('#editPageTxt').empty();
$('#editPageTxt').append(msg);
}
</script>
</script>
<html>
<html>

Latest revision as of 10:27, 24 October 2013

<html> <style> /* ul.menu li.</html>{{{pagetype}}}<html> a {

 color: cyan;

}

  • /
  1. toc {

display: none; }

  1. mytoc {

background: none; width: 200px; }

.toc { border: 0px solid; }

  1. toc ul ul,.toc ul ul {

margin: 0 0 0 1em; }

table.toc { background-color: #f0f4f4; }

  1. mytoc a,#mytoc a:visited {

font-size: normal; color: #222222; }

  1. mytoc a:hover {

font-color: #009ee0; /* text-decoration: underline; */ }

  1. wiki-toc {

width: 200px; margin-top: 6px; float: left; }

  1. wiki-body {

margin-left: 200px; padding-left: 12px; padding-right: 35px; }

  1. toc #toctitle,.toc #toctitle,#toc .toctitle,.toc .toctitle {

text-align: left; }

  1. toc h2,.toc h2 {

font-weight: normal; font-size: 17px; }

/*

  1. wiki-contents A {

color: #00aeef; }

  1. wiki-contents A:HOVER {

color: #00aeef; }

  • /
  1. toctitle span {

display: none; }

/*

  1. wiki-body p,#wiki-body li,#wiki-body dd,div.thumbcaption {

font-size: medium; }

  • /

/* required to avoid jumping */

  1. tocScrolWrapper {

/* left: 450px; */ position: absolute; /* margin-left: 35px; width: 280px; */ }

  1. tocScrol {

position: absolute; top: 0; /* just used to show how to include the margin in the effect */ /*margin-top: 20px; */ /* border-top: 1px solid purple; */ /*padding-top: 19px;*/ }

  1. tocScrol.fixed {

position: fixed; top: 0; }

  1. editPageTxt {

text-align: left; padding-left: 15px; }

  1. editPageTxt P {

clear: both; }

  1. toPageTop {

float: left; position: relative; top: 18px; left: 13px; color: #d13f31; } </style>

<script type="text/javascript"> $(document).ready(function() { var parentTable = $("#toc").parent(); $('#mytoc').append($("#toc").first());

$('#mytoc').find("#toc").attr("id", ""); parentTable.closest('table').remove(); });

$(document).ready( function() { var top = $('#tocScrol').offset().top - parseFloat($('#tocScrol').css('marginTop').replace( /auto/, 0)); var nav = $('#tocScrol'); var max = $('#indexing').offset().top - nav.height();

$(window).scroll(function(event) { // what the y position of the scroll is var y = $(this).scrollTop();

if (y > top) { // && signs are html decoded thus this construction if (y >= max) { nav.removeClass('fixed'); nav.css({ position : 'absolute', top : max - top }); } else { nav.addClass('fixed'); nav.removeAttr('style'); } } else { nav.removeClass('fixed'); nav.removeAttr('style'); } }); }); </script> <html> <html> <div id="wiki-contents"> <div id="tocScrolWrapper"> <div id="tocScrol"> <div id="wiki-toc"> <a id="toPageTop" href="#">&#x25B2;</a> <table id="mytoc" class="toc" summary="Contents"> </table> <div id="editPageTxt"> <p> [<a href="http://openwetware.org/index.php?title=Biomod/2013/Aarhus/</html>{{{pagename}}}<html>&action=edit">edit this page</a>] </p> </div> </div> </div> </div> <div id="wiki-body"> </html>