Template:MIT-results
From 2012.igem.org
(Difference between revisions)
Line 11: | Line 11: | ||
<!-- TODO: add pre/n buttons --> | <!-- TODO: add pre/n buttons --> | ||
<script> | <script> | ||
- | + | function direct_link_to_page() | |
+ | { | ||
+ | var hash = window.location.hash; | ||
+ | if (hash != "") | ||
+ | { | ||
+ | //alert($('.section').index($(hash))); | ||
+ | //$('#accordion').accordion('activate', $('.section').index($(hash))); | ||
+ | //var id = hash.substring(1, hash.length - 3); | ||
+ | //alert(id); | ||
+ | //alert($('#col_nav').innerHTML); | ||
+ | $('.section').hide(); | ||
+ | //var name = $(this).attr('id'); | ||
+ | $(hash).fadeIn(500); | ||
+ | } | ||
+ | } | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
$('#nav_results a').first().css('background-color','#333333'); | $('#nav_results a').first().css('background-color','#333333'); | ||
Line 27: | Line 41: | ||
window.location.href=name; | window.location.href=name; | ||
}); | }); | ||
- | + | direct_link_to_page(); | |
$('.section_page_link').click(function () { | $('.section_page_link').click(function () { | ||
var url = $(this).attr('href'); | var url = $(this).attr('href'); |