Difference between revisions of "Team:Heidelberg/PiratesCorner"

 
(3 intermediate revisions by the same user not shown)
Line 10: Line 10:
  
 
<script type="text/javascript" src="https://2015.igem.org/Template:Heidelberg/js/primer?action=raw&ctype=text/javascript"></script>
 
<script type="text/javascript" src="https://2015.igem.org/Template:Heidelberg/js/primer?action=raw&ctype=text/javascript"></script>
<script type="text/javascript">
 
 
    $(function() {
 
            $("#notebookpanel").hover(
 
                    function() {
 
                        $(this).css("background", "linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7)),url(https://static.igem.org/mediawiki/2015/thumb/a/ad/Heidelberg_media_pictures_notebook_color.png/800px-Heidelberg_media_pictures_notebook_color.png)")
 
                    },
 
                    function() {
 
                        $(this).css("background","linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7)),url(https://static.igem.org/mediawiki/2015/thumb/4/40/Heidelberg_media_pictures_notebook_bw.png/800px-Heidelberg_media_pictures_notebook_bw.png)");
 
            });
 
        });
 
 
    $(function () {
 
        $('.timeline li .timeline-panel').click(function () {
 
            adjustview();
 
            $panelid = '#' + $(this).attr('id');
 
            var descid = '#desc' + $(this).attr('id');
 
 
            timeline(descid);
 
 
        });
 
    })
 
 
    $(function () {
 
        $('.timeline li .timeline-badge').click(function () {
 
            shrinkTimeline();
 
        })
 
    })
 
 
    function timeline(descid) {
 
        console.log(descid + ', ' + $descidold);
 
        extendTimeline();
 
        if ($descidold == descid) {
 
            adjustview();
 
            /* maybe I'll do something here later */
 
        } else {
 
            $($descidold).css({ "display": "none" });
 
            extendTimelinePanel(descid);
 
        }
 
}
 
 
    function adjustview() {
 
      // $('html, body').animate({ scrollTop: ($($panelid).offset().top - 105) }, 500);
 
      // console.log($($panelid).offset().top);
 
    }
 
 
function extendTimelinePanel(descid) {
 
    $(descid).css({ "display": "block" });
 
    $descidold = descid;
 
    adjustview();
 
}
 
 
function extendTimeline() {
 
    $(".timeline-badge").animate({ "left": "5%" });
 
 
    $(".timeline li .timeline-panel").animate({ "width": "820px" });
 
    $(".timeline li .timeline-panel").css({ "float": "right" });
 
    $(".timeline li .timeline-panel").addClass('active');
 
    $(".timeline li .timeline-panel").css({ "border-right": "5px solid #4063D7" });
 
    $(".timeline li .timeline-panel").css({ "border-left": "0px" });
 
    $(".timeline").addClass('active');
 
}
 
 
function shrinkTimeline() {
 
    $(".timeline-badge").animate({ "left": "50%" });
 
    $(".timeline").removeClass('active');
 
    $(".description").css({ "display": "none" });
 
 
    $(".timeline li .timeline-panel").css({ "float": "left" });
 
    $(".timeline li.timeline-inverted .timeline-panel").css({ "float": "right" });
 
    $(".timeline li .timeline-panel").animate({ "margin-left": "0px" });
 
    $(".timeline li .timeline-panel").animate({ "left": "0px" });
 
    $(".timeline li .timeline-panel").animate({ "width": "415px" });
 
    $(".timeline li .timeline-panel").css({ "border-left": "5px solid #4063D7" });
 
    $(".timeline li .timeline-panel").css({ "border-right": "0px" });
 
    $(".timeline li.timeline-inverted .timeline-panel").css({ "border-right": "5px solid #4063D7" });
 
    $(".timeline li.timeline-inverted .timeline-panel").css({ "border-left": "0px" });
 
    $descidold = '';
 
}
 
 
 
 
 
 
<!-- Replace text -->
 
 
function primer(id){
 
    showId = id.replace(/xx/g, "").toUpperCase();
 
    var primername = '$' + id + '_name';
 
    var primerseq = '$' + id + '_seq';
 
  try{ 
 
var toolcontent = '&lt;strong&gt;' + eval(primername) + '&lt;/strong&gt;&lt;br/&gt;' + eval(primerseq);       
 
return '<span class="tooltipster" title="' + toolcontent + '">' + showId + '</span>';
 
} catch(err) {;}
 
};
 
 
$(function() {
 
    $(".dropdown").hover( function() {
 
        $(this).dropdown();
 
    });
 
});
 
 
$(function() {
 
    $("body *").replaceText( /xx.....xx/gi, primer);
 
  $('.tooltipster').tooltipster({
 
    contentAsHTML: true
 
    });
 
});
 
 
<!-- Replace text ende -->
 
 
// Used to expand and collapse logbook entries
 
$(function() {
 
    $('.notebooktext').hide();
 
    $('.notebookheading').on('click', function(event) {
 
        $(this).siblings().filter('.notebooktext').slideToggle();
 
        event.preventDefault();
 
    });
 
});
 
 
MathJax.Hub.Config({
 
  tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
 
  jax: ["input/TeX","output/SVG"]
 
});
 
 
 
</script>
 
 
<script type="text/javascript" src="https://2015.igem.org/Template:Heidelberg/js/bootstrapmin?action=raw&ctype=text/javascript"></script>
 
<script type="text/javascript" src="https://2015.igem.org/Template:Heidelberg/js/bootstrapmin?action=raw&ctype=text/javascript"></script>
 
<script type="text/javascript" src="https://2015.igem.org/Template:Heidelberg/js/jasnybootstrapmin?action=raw&ctype=text/javascript"></script>
 
<script type="text/javascript" src="https://2015.igem.org/Template:Heidelberg/js/jasnybootstrapmin?action=raw&ctype=text/javascript"></script>

Latest revision as of 08:24, 18 September 2015