|
42 | 42 | <div class="content"> |
43 | 43 |
|
44 | 44 | <h1 class="ref-header"><img src="<!-- webcontentpath -->img/header.gif" alt="Language (API). The Processing Language has been designed to facilitate the creation of sophisticated visual and conceptual structures." /></h1> |
45 | | - |
| 45 | + |
| 46 | + <script src="<!-- webcontentpath -->javascript/mode-select.js" type="text/javascript"></script> |
46 | 47 | <div class="ref-top"> |
47 | | - <div id="ref-mode-switch"> |
48 | | - <ul><li><a href="#" mode="java" style="color:red">Standard Processing</a></li> |
49 | | - <li><a href="#" mode="js">JavaScript (Processing.js)</a></li></ul> |
50 | | - </div> |
51 | | - <div id="ref-mode-text"> |
| 48 | + <div id="ref-mode-text" style="display: none"> |
52 | 49 | Processing code can be run in <a href="<!-- webcontentpath -->environment/index.html#Programming_modes">different modes</a>. This reference unites the standard and Javascript flavours. Use the links to the left to highlight any differences. |
53 | 50 | </div> |
54 | | -<script type="text/javascript"> |
55 | | - $(document).ready(function(){ |
56 | | - $('.ref-top').show(); |
57 | | - $('.ref-top a').each(function(i,e){ |
58 | | - var mode = $(e).attr('mode'); |
59 | | - $(e).bind('click',function(evt){ |
60 | | - activateItems($('a.ref-link')); |
61 | | - disableItems( $('.no-'+mode) ); |
62 | | - activateItems( $('.'+mode+'-only').show() ); |
63 | | - $('.ref-top a').css('color',''); |
64 | | - $(this).css('color','#333'); |
65 | | - $('.ref-top .is-selected').removeClass('is-selected'); |
66 | | - $(this).addClass('is-selected'); |
67 | | - },false); |
68 | | - }); |
69 | | - var showMode = "java"; |
70 | | - if ( document.location.href.indexOf('mode=') >= 0 ) |
71 | | - showMode = document.location.href.replace(/.+\?.*mode=([a-z]+)&?.*/,"$1"); |
72 | | - $('.ref-top a[mode='+showMode+']').click(); |
73 | | - }); |
74 | | - function disableItems ( items ) { |
75 | | - items.addClass("is-disabled"); |
76 | | - items.bind('click',function(){return false;},false); |
77 | | - items.attr('title','These items are not available in the current mode.'); |
78 | | - } |
79 | | - function activateItems ( items ) { |
80 | | - items.removeClass("is-disabled"); |
81 | | - items.unbind('click'); |
82 | | - items.attr('title',''); |
83 | | - } |
84 | | -</script> |
85 | | -<div style="clear:both"></div></div> |
86 | | - |
| 51 | + <div id="ref-mode-switch"> |
| 52 | + <ul><li><a href="#" mode="java">Standard Processing</a></li> |
| 53 | + <li><a href="#" mode="js">JavaScript (Processing.js)</a></li> |
| 54 | + </ul> |
| 55 | + </div> |
| 56 | + <div id="ref-mode-switch-bottom"></div> |
| 57 | + </div> |
| 58 | + |
87 | 59 | <div class="ref-col"> |
88 | 60 |
|
89 | 61 | <div class="category js-only no-java"> |
|
0 commit comments