Difference between revisions of "Sandbox"

From Organic Design wiki
m
(ajax test)
Line 1: Line 1:
{{#tree:id=foo-tree|
+
<html><script lang="javascript">
*aaa
 
*ddd
 
*eee
 
**bbb
 
***[[ccc]]
 
****[[Sandbohhx]]
 
*baz
 
**bazzz
 
***adasdas
 
*jlkjlk
 
*k;lk;
 
**ksha
 
***[[Sandbox]]
 
}}
 
 
 
<html>
 
<script lang="javascript">
 
  
 
$(document).ready( function() {
 
$(document).ready( function() {
    tamfootree.closeAll();
+
$.ajax({
    $('#foo-tree .selflink').each( function() {
+
type: 'GET',
        tamfootree.openTo($(this).parent().parent().attr('id').replace(/[^0-9]/g, ''));
+
url: mw.util.wikiScript(),
    });
+
data: { action: 'raw', title: mw.config.get('wgPageName')] },
 +
dataType: 'html',
 +
success: function(html) { alert(html); }
 +
});
 
});
 
});
  
</script>
+
</script></html>
</html>
 

Revision as of 15:13, 25 August 2012