Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    <div id="sctext">/tracks/171309877</div>
  2.     <script>
  3.         var PATHmod;
  4.         $(document).ready(function(){
  5.             var PATH = document.getElementById('sctext').innerHTML;
  6.             /* initialize soundcloud API with key */
  7.             SC.initialize({
  8.                 /* This is the sample client_id. you should replace this with your own*/
  9.                 client_id: "e0ff6"
  10.             });
  11.             /* Use soundcloud API to get info of a specific track */
  12.             SC.get(PATH
  13.                 ,function(tracks, err){
  14.                     // show artwork url as text
  15.                     var url = tracks.artwork_url;
  16.                     PATHmod = url.replace("large", "t500x500");
  17.                     $("#pf").html(PATHmod);
  18.                     $("#url").html(tracks.artwork_url);
  19.                     // show image url links too
  20.                     $("#img").attr({src:PATHmod, width: "100%"});
  21.                     $(".test1").attr({width: "100%"});
  22.                 });
  23.             /* Write modified Links in Divs for parallax.js*/
  24.             document.getElementById('etet').dataset.imageSrc=PATHmod;
  25.             document.getElementById('stella').dataset.imageSrc=PATHmod;
  26.         });
  27.     </script>
  28.     <h1>URL</h1>
  29.     <div id="url"></div>
  30.     <h1>Image</h1>
  31.     <img id="img">
  32.     <p id="pf"></p>
  33.     <div id="stella">
  34.         <div class="cat" id="test4"></div>
  35.     </div>
  36.     <script>$('#stella').parallax({imageSrc: 'https://i1.sndcdn.com/artworks-000093394965-lp3z7y-t500x500.jpg'});</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement