69c62ed5d92196c2863938d6ad7ce0ba0cfc07fc
Andrew Lewman new download page layout fr...

Andrew Lewman authored 12 years ago

1) $(function(){
2)   /* If javascript is enabled this hides all sections by default */
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

3)   $(".easy").css('display', 'none');
Andrew Lewman new download page layout fr...

Andrew Lewman authored 12 years ago

4)   /* Only show language selector if javascript is enabled */
5)   $('.lang').css('display', 'block');
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

6)   $('.lang-alt').css('display', 'none');
7)   $('.expander').css('display', 'block');
8)   $('.sidenav').css('display', 'none');
Andrew Lewman new download page layout fr...

Andrew Lewman authored 12 years ago

9) });
10) 
11) /* Uses result of jquery.client to open the relevant section */
12) function OScheck() {
13)   var clientos = $.client.os;
14)   if(clientos == "Linux"){
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

15)     $('.easy.linux').css('display', 'block');
Andrew Lewman new download page layout fr...

Andrew Lewman authored 12 years ago

16)   }else if(clientos == "Windows"){
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

17)     $('.easy.windows').css('display', 'block');
Andrew Lewman new download page layout fr...

Andrew Lewman authored 12 years ago

18)   }else if(clientos == "Mac"){
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

19)     $('.easy.mac').css('display', 'block');
20)   }else{
21)     $('.easy').css('display', 'block');
Andrew Lewman new download page layout fr...

Andrew Lewman authored 12 years ago

22)   }
23) }
24)   $(function(){
25)   OScheck();
26) });
27) 
28) /* Reset language default - needed in the event of returning to the page via back button */
29) function resetAll() {
30)   var f = document.forms;
31)   var last = f.length - 1;
32)   for (var i = 0; i < last; i++) {
33)     f[i].reset();
34)   }
35) }
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

36) 
Andrew Lewman patch from jmtodaro for eve...

Andrew Lewman authored 12 years ago

37) $(document).ready(function () {
38) 
39)     $('.jump').click(function(event){
40)       //prevent the default action for the click event
41)       //event.preventDefault();
42) 
43)       //get the full url - like mysitecom/index.htm#home
44)       var full_url = this.href;
45) 
46)       //split the url by # and get the anchor target name - home in mysitecom/index.htm#home
47)       var parts = full_url.split("#");
48)       var trgt = parts[1];
49) 
50)       //get the top offset of the target anchor
51)       var target_offset = $("#"+trgt).offset();
52)       var target_top = target_offset.top;
53) 
54)       //goto that anchor by setting the body scroll top to anchor top
55) //      $('html, body').animate({scrollTop:target_top}, 1000);
56)     });
57) 
58)       
59)     // Bind an event to window.onhashchange
60)     $(window).bind( 'hashchange', function(e) {
61) 
62)       // Get the hash (fragment) as a string, with any leading # removed.
63)       var url = $.param.fragment();
64) 
65)       // Toggle the '.easy' divs to off
66)       if(url == 'windows'|url == 'mac'|url == 'linux'){
67) 
68) 	  $('.easy').css('display', 'none');
69)       }
70)       
71)       if(url == 'windows'){
72) 	$('.easy.windows').css('display', 'block');
73)       } else if(url == 'mac'){
74) 	$('.easy.mac').css('display', 'block');
75)       } else if(url == 'linux'){
76) 	$('.easy.linux').css('display', 'block');
77)       } else {
Andrew Lewman patch to dlpage01 javascript.

Andrew Lewman authored 12 years ago

78) 	  $('.easy').css('display', 'none');