Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="sctext">/tracks/171309877</div>
- <script>
- var PATHmod;
- $(document).ready(function(){
- var PATH = document.getElementById('sctext').innerHTML;
- /* initialize soundcloud API with key */
- SC.initialize({
- /* This is the sample client_id. you should replace this with your own*/
- client_id: "e0ff6"
- });
- /* Use soundcloud API to get info of a specific track */
- SC.get(PATH
- ,function(tracks, err){
- // show artwork url as text
- var url = tracks.artwork_url;
- PATHmod = url.replace("large", "t500x500");
- $("#pf").html(PATHmod);
- $("#url").html(tracks.artwork_url);
- // show image url links too
- $("#img").attr({src:PATHmod, width: "100%"});
- $(".test1").attr({width: "100%"});
- });
- /* Write modified Links in Divs for parallax.js*/
- document.getElementById('etet').dataset.imageSrc=PATHmod;
- document.getElementById('stella').dataset.imageSrc=PATHmod;
- });
- </script>
- <h1>URL</h1>
- <div id="url"></div>
- <h1>Image</h1>
- <img id="img">
- <p id="pf"></p>
- <div id="stella">
- <div class="cat" id="test4"></div>
- </div>
- <script>$('#stella').parallax({imageSrc: 'https://i1.sndcdn.com/artworks-000093394965-lp3z7y-t500x500.jpg'});</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement