mirror of
https://github.com/jcreek/phldnhack.git
synced 2026-07-12 18:43:43 +00:00
28 lines
428 B
JavaScript
28 lines
428 B
JavaScript
$(document).ready(function(){
|
|
|
|
Ractive.components.parent = Ractive.extend({
|
|
template:'#parent'
|
|
});
|
|
|
|
Ractive.components.teacher = Ractive.extend({
|
|
template:'#teacher'
|
|
});
|
|
|
|
|
|
$.getJSON('/data/'+location.pathname.split('/').slice(3).join('/'), function(res){
|
|
|
|
var ractive = new Ractive.components[location.pathname.split('/')[2]]({
|
|
el:'#load',
|
|
data:res
|
|
});
|
|
|
|
});
|
|
|
|
|
|
//Code below here
|
|
|
|
|
|
|
|
|
|
});
|