Team:NTNU Trondheim/Templates/Footer

From 2012.igem.org

(Difference between revisions)
 
(6 intermediate revisions not shown)
Line 22: Line 22:
<!-- Placed at the end of the document so the pages load faster -->
<!-- Placed at the end of the document so the pages load faster -->
-
<!-- jQuery -->
+
<!-- Bootstrap -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
-
 
+
<script src="http://oveoyas.github.io/igem-ntnu-2012/js/bootstrap.min.js"></script>
-
<!-- bootstrap-transition.js -->
+
-
!function($){$(function(){"use strict";$.support.transition=(function(){var transitionEnd=(function(){var el=document.createElement('bootstrap'),transEndEventNames={'WebkitTransition':'webkitTransitionEnd','MozTransition':'transitionend','OTransition':'oTransitionEnd','msTransition':'MSTransitionEnd','transition':'transitionend'},name for(name in transEndEventNames){if(el.style[name]!==undefined){return transEndEventNames[name]}}}())return transitionEnd&&{end:transitionEnd}})()})}(window.jQuery);
+
-
 
+
-
<!-- bootstrap-alert.js -->
+
-
!function($){"use strict";var dismiss='[data-dismiss="alert"]',Alert=function(el){$(el).on('click',dismiss,this.close)}Alert.prototype.close=function(e){var $this=$(this),selector=$this.attr('data-target'),$parent if(!selector){selector=$this.attr('href')selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}$parent=$(selector)e&&e.preventDefault()$parent.length||($parent=$this.hasClass('alert')?$this:$this.parent())$parent.trigger(e=$.Event('close'))if(e.isDefaultPrevented())return $parent.removeClass('in')function removeElement(){$parent.trigger('closed').remove()}$.support.transition&&$parent.hasClass('fade')?$parent.on($.support.transition.end,removeElement):removeElement()}$.fn.alert=function(option){return this.each(function(){var $this=$(this),data=$this.data('alert')if(!data)$this.data('alert',(data=new Alert(this)))if(typeof option=='string')data[option].call($this)})}$.fn.alert.Constructor=Alert $(function(){$('body').on('click.alert.data-api',dismiss,Alert.prototype.close)})}(window.jQuery);
+
-
 
+
-
<!-- bootstrap-dropdown.js -->
+
-
!function($){"use strict";var toggle='[data-toggle="dropdown"]',Dropdown=function(element){var $el=$(element).on('click.dropdown.data-api',this.toggle)$('html').on('click.dropdown.data-api',function(){$el.parent().removeClass('open')})}Dropdown.prototype={constructor:Dropdown,toggle:function(e){var $this=$(this),$parent,selector,isActive if($this.is('.disabled, :disabled'))return selector=$this.attr('data-target')if(!selector){selector=$this.attr('href')selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}$parent=$(selector)$parent.length||($parent=$this.parent())isActive=$parent.hasClass('open')clearMenus()if(!isActive)$parent.toggleClass('open')return false}}function clearMenus(){$(toggle).parent().removeClass('open')}$.fn.dropdown=function(option){return this.each(function(){var $this=$(this),data=$this.data('dropdown')if(!data)$this.data('dropdown',(data=new Dropdown(this)))if(typeof option=='string')data[option].call($this)})}$.fn.dropdown.Constructor=Dropdown $(function(){$('html').on('click.dropdown.data-api',clearMenus)$('body').on('click.dropdown','.dropdown form',function(e){e.stopPropagation()}).on('click.dropdown.data-api',toggle,Dropdown.prototype.toggle)})}(window.jQuery);
+
-
 
+
-
<!-- bootstrap-button.js -->
+
-
!function($){"use strict";var Button=function(element,options){this.$element=$(element)this.options=$.extend({},$.fn.button.defaults,options)}Button.prototype.setState=function(state){var d='disabled',$el=this.$element,data=$el.data(),val=$el.is('input')?'val':'html'state=state+'Text'data.resetText||$el.data('resetText',$el[val]())$el[val](data[state]||this.options[state])setTimeout(function(){state=='loadingText'?$el.addClass(d).attr(d,d):$el.removeClass(d).removeAttr(d)},0)}Button.prototype.toggle=function(){var $parent=this.$element.parent('[data-toggle="buttons-radio"]')$parent&&$parent.find('.active').removeClass('active')this.$element.toggleClass('active')}$.fn.button=function(option){return this.each(function(){var $this=$(this),data=$this.data('button'),options=typeof option=='object'&&option if(!data)$this.data('button',(data=new Button(this,options)))if(option=='toggle')data.toggle()else if(option)data.setState(option)})}$.fn.button.defaults={loadingText:'loading...'}$.fn.button.Constructor=Button $(function(){$('body').on('click.button.data-api','[data-toggle^=button]',function(e){var $btn=$(e.target)if(!$btn.hasClass('btn'))$btn=$btn.closest('.btn')$btn.button('toggle')})})}(window.jQuery);
+
-
 
+
-
<!-- bootstrap-collapse.js -->
+
-
!function($){"use strict";var Collapse=function(element,options){this.$element=$(element)this.options=$.extend({},$.fn.collapse.defaults,options)if(this.options.parent){this.$parent=$(this.options.parent)}this.options.toggle&&this.toggle()}Collapse.prototype={constructor:Collapse,dimension:function(){var hasWidth=this.$element.hasClass('width')return hasWidth?'width':'height'},show:function(){var dimension,scroll,actives,hasData if(this.transitioning)return dimension=this.dimension()scroll=$.camelCase(['scroll',dimension].join('-'))actives=this.$parent&&this.$parent.find('> .accordion-group > .in')if(actives&&actives.length){hasData=actives.data('collapse')if(hasData&&hasData.transitioning)return actives.collapse('hide')hasData||actives.data('collapse',null)}this.$element[dimension](0)this.transition('addClass',$.Event('show'),'shown')this.$element[dimension](this.$element[0][scroll])},hide:function(){var dimension if(this.transitioning)return dimension=this.dimension()this.reset(this.$element[dimension]())this.transition('removeClass',$.Event('hide'),'hidden')this.$element[dimension](0)},reset:function(size){var dimension=this.dimension()this.$element.removeClass('collapse')[dimension](size||'auto')[0].offsetWidth this.$element[size!==null?'addClass':'removeClass']('collapse')return this},transition:function(method,startEvent,completeEvent){var that=this,complete=function(){if(startEvent.type=='show')that.reset()that.transitioning=0 that.$element.trigger(completeEvent)}this.$element.trigger(startEvent)if(startEvent.isDefaultPrevented())return this.transitioning=1 this.$element[method]('in')$.support.transition&&this.$element.hasClass('collapse')?this.$element.one($.support.transition.end,complete):complete()},toggle:function(){this[this.$element.hasClass('in')?'hide':'show']()}}$.fn.collapse=function(option){return this.each(function(){var $this=$(this),data=$this.data('collapse'),options=typeof option=='object'&&option if(!data)$this.data('collapse',(data=new Collapse(this,options)))if(typeof option=='string')data[option]()})}$.fn.collapse.defaults={toggle:true}$.fn.collapse.Constructor=Collapse $(function(){$('body').on('click.collapse.data-api','[data-toggle=collapse]',function(e){var $this=$(this),href,target=$this.attr('data-target')||e.preventDefault()||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''),option=$(target).data('collapse')?'toggle':$this.data()$(target).collapse(option)})})}(window.jQuery);
+
-
 
+
-
<!-- bootstrap-carousel.js -->
+
-
!function($){"use strict";var Carousel=function(element,options){this.$element=$(element)this.options=options this.options.slide&&this.slide(this.options.slide)this.options.pause=='hover'&&this.$element.on('mouseenter',$.proxy(this.pause,this)).on('mouseleave',$.proxy(this.cycle,this))}Carousel.prototype={cycle:function(e){if(!e)this.paused=false this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval))return this},to:function(pos){var $active=this.$element.find('.active'),children=$active.parent().children(),activePos=children.index($active),that=this if(pos>(children.length-1)||pos<0)return if(this.sliding){return this.$element.one('slid',function(){that.to(pos)})}if(activePos==pos){return this.pause().cycle()}return this.slide(pos>activePos?'next':'prev',$(children[pos]))},pause:function(e){if(!e)this.paused=true clearInterval(this.interval)this.interval=null return this},next:function(){if(this.sliding)return return this.slide('next')},prev:function(){if(this.sliding)return return this.slide('prev')},slide:function(type,next){var $active=this.$element.find('.active'),$next=next||$active[type](),isCycling=this.interval,direction=type=='next'?'left':'right',fallback=type=='next'?'first':'last',that=this,e=$.Event('slide')this.sliding=true isCycling&&this.pause()$next=$next.length?$next:this.$element.find('.item')[fallback]()if($next.hasClass('active'))return if($.support.transition&&this.$element.hasClass('slide')){this.$element.trigger(e)if(e.isDefaultPrevented())return $next.addClass(type)$next[0].offsetWidth $active.addClass(direction)$next.addClass(direction)this.$element.one($.support.transition.end,function(){$next.removeClass([type,direction].join(' ')).addClass('active')$active.removeClass(['active',direction].join(' '))that.sliding=false setTimeout(function(){that.$element.trigger('slid')},0)})}else{this.$element.trigger(e)if(e.isDefaultPrevented())return $active.removeClass('active')$next.addClass('active')this.sliding=false this.$element.trigger('slid')}isCycling&&this.cycle()return this}}$.fn.carousel=function(option){return this.each(function(){var $this=$(this),data=$this.data('carousel'),options=$.extend({},$.fn.carousel.defaults,typeof option=='object'&&option)if(!data)$this.data('carousel',(data=new Carousel(this,options)))if(typeof option=='number')data.to(option)else if(typeof option=='string'||(option=options.slide))data[option]()else if(options.interval)data.cycle()})}$.fn.carousel.defaults={interval:5000,pause:'hover'}$.fn.carousel.Constructor=Carousel $(function(){$('body').on('click.carousel.data-api','[data-slide]',function(e){var $this=$(this),href,$target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')),options=!$target.data('modal')&&$.extend({},$target.data(),$this.data())$target.carousel(options)e.preventDefault()})})}(window.jQuery);
+
<script type="text/javascript">
<script type="text/javascript">
Line 57: Line 40:
<!-- jQuery countdown -->
<!-- jQuery countdown -->
-
<script type="text/javascript" src="http://folk.ntnu.no/oyas/igem/extras/js/jquery.countdown.js"></script>
+
<script type="text/javascript" src="http://oveoyas.github.io/igem-ntnu-2012/js/jquery.countdown.js"></script>
<script type="text/javascript">
<script type="text/javascript">
$(function () {
$(function () {
Line 122: Line 105:
<!-- Fill the screen of index page on tablets -->
<!-- Fill the screen of index page on tablets -->
<script type="text/javascript">
<script type="text/javascript">
-
     $(document).ready(function() {
+
     $(document).ready(function() {f
     if ( $(window).width() < 1100 ) {
     if ( $(window).width() < 1100 ) {
         $('#index-collapse').addClass('span12').removeClass('span9');
         $('#index-collapse').addClass('span12').removeClass('span9');

Latest revision as of 16:11, 16 June 2013