bye bye github
This commit is contained in:
18
public/home/podcast/jsPodcast.js
Executable file
18
public/home/podcast/jsPodcast.js
Executable file
@@ -0,0 +1,18 @@
|
||||
var sources;
|
||||
d3.json( "home/podcast/jsonPod.json",function(d){
|
||||
d3.select("#audioframe").attr("src",d[0].source);
|
||||
sources=d;
|
||||
});
|
||||
d3.selectAll("p.ctitle").on('click', function(){
|
||||
var this_id=d3.select(this).attr("value");
|
||||
sources.forEach(function (d){
|
||||
if(d.id == this_id){
|
||||
d3.select("#audioframe").attr("src",d.source);
|
||||
window.scroll(0,
|
||||
d3.select("#sframe").node().getBoundingClientRect().top -
|
||||
d3.select("#stitle").node().getBoundingClientRect().top
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user