Team:METU/Gallery
From 2012.igem.org
(Difference between revisions)
Line 1: | Line 1: | ||
+ | |||
<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> | <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> | ||
<head> | <head> | ||
Line 17: | Line 18: | ||
<script src="http://simsekburak.com/hasan/js/jquery.jcarousel.js" type="text/javascript"></script> | <script src="http://simsekburak.com/hasan/js/jquery.jcarousel.js" type="text/javascript"></script> | ||
- | + | ||
Line 38: | Line 39: | ||
$('#myGallery').galleryView(); | $('#myGallery').galleryView(); | ||
}); | }); | ||
+ | </script> | ||
+ | |||
+ | |||
+ | <script type="text/javascript"> | ||
+ | |||
+ | function mycarousel_initCallback(carousel) { | ||
+ | |||
+ | $('.slider-nav a').bind('click', function() { | ||
+ | carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text())); | ||
+ | return false; | ||
+ | }); | ||
+ | |||
+ | }; | ||
+ | |||
+ | function mycarousel_itemFirstInCallback(carousel, item, idx, state) { | ||
+ | $('.slider-nav a').removeClass('active'); | ||
+ | $('.slider-nav a').eq(idx-1).addClass('active'); | ||
+ | |||
+ | }; | ||
+ | |||
+ | |||
+ | $(function(){ | ||
+ | |||
+ | //Horizontal Carousel | ||
+ | $('.slider-left ul, .slider-right ul').jcarousel({ | ||
+ | auto: 5, | ||
+ | wrap: "last", | ||
+ | scroll: 1, | ||
+ | visible: 1, | ||
+ | initCallback: mycarousel_initCallback, | ||
+ | itemFirstInCallback:mycarousel_itemFirstInCallback, | ||
+ | buttonNextHTML: null, | ||
+ | buttonPrevHTML: null | ||
+ | }); | ||
+ | |||
+ | //Blink Fields | ||
+ | $('.blink'). | ||
+ | focus(function() { | ||
+ | if(this.title==this.value) { | ||
+ | this.value = ''; | ||
+ | } | ||
+ | }). | ||
+ | blur(function(){ | ||
+ | if(this.value=='') { | ||
+ | this.value = this.title; | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | //Navigation | ||
+ | |||
+ | $('#navigation ul li').hover(function() { | ||
+ | |||
+ | if( $(this).find('.dd-holder').length > 0 ) { | ||
+ | |||
+ | $(this).find('span').addClass('link'); | ||
+ | $(this).find('a:eq(0)').addClass('hover'); | ||
+ | $(this).find('a.hover').append('<span class="hide"> </span>'); | ||
+ | |||
+ | var hide_width = $('.hover').outerWidth() -8; | ||
+ | $(this).find('.hide').css({ | ||
+ | width : hide_width, | ||
+ | display : "block" | ||
+ | }); | ||
+ | |||
+ | $(this).find('.dd-holder:eq(0)').show(); | ||
+ | |||
+ | $('.dd-holder ul li').hover(function(){ | ||
+ | if( $(this).find('.dd-holder').length > 0) { | ||
+ | $(this).find('a:eq(0)').addClass('subhover'); | ||
+ | } | ||
+ | }, | ||
+ | function(){ | ||
+ | $(this).find('a:eq(0)').removeClass('subhover'); | ||
+ | }); | ||
+ | } | ||
+ | |||
+ | }, | ||
+ | function(){ | ||
+ | $(this).find('a').removeClass('hover'); | ||
+ | $(this).find('.dd-holder:eq(0)').hide(); | ||
+ | $(this).find('span').removeClass('link'); | ||
+ | $(this).find('.hide').remove(); | ||
+ | }); | ||
+ | |||
+ | //PNG Fix for IE 6 | ||
+ | if( $.browser.msie && $.browser.version.substr(0,1) == 6 ){ | ||
+ | DD_belatedPNG.fix('.dd, .dd-t, .dd-b'); | ||
+ | } | ||
+ | |||
+ | }); | ||
+ | |||
</script> | </script> | ||
Line 178: | Line 270: | ||
<ul id="myGallery"> | <ul id="myGallery"> | ||
<li><img src="https://static.igem.org/mediawiki/igem.org/d/dc/Metu-photos-gallery-8.JPG" alt="Scary Lab" /></li> | <li><img src="https://static.igem.org/mediawiki/igem.org/d/dc/Metu-photos-gallery-8.JPG" alt="Scary Lab" /></li> | ||
- | + | <li><img src="/wiki/images/a/a0/Metu-photos-gallery-99.JPG" alt="Cleaning the lab" /></li> | |
<li><img src="https://static.igem.org/mediawiki/igem.org/0/0c/Metu-photos-gallery-18.JPG" alt="Cleaning the lab" /></li> | <li><img src="https://static.igem.org/mediawiki/igem.org/0/0c/Metu-photos-gallery-18.JPG" alt="Cleaning the lab" /></li> | ||
<li><img src="https://static.igem.org/mediawiki/igem.org/3/3f/Metu-photos-gallery-50.JPG" alt="Cleaning the lab" /></li> | <li><img src="https://static.igem.org/mediawiki/igem.org/3/3f/Metu-photos-gallery-50.JPG" alt="Cleaning the lab" /></li> |
Revision as of 16:53, 25 September 2012