Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery make variable out of links used in plugin
    primarykey
    data
    text
    <p>This is a weird one, I apologize.</p> <p>I'm working with Soundcloud's <a href="https://github.com/soundcloud/soundcloud-custom-player/wiki/" rel="nofollow">Custom Player</a> and need to make a variable out of the src of each link the plugin is initiated on. I've been digging around the source and can't find where it takes the links in and starts manipulating them. <a href="https://github.com/soundcloud/soundcloud-custom-player/blob/master/js/sc-player.js" rel="nofollow">Here is the source></a></p> <p>So to be clear, there are a bunch of links on my page:</p> <pre><code>&lt;a class="sc" href="link/to/soundcloud/"&gt;yeah!&lt;/a&gt; </code></pre> <p>The plugin is initialized with:</p> <pre><code>$('a.sc').scPlayer(); </code></pre> <p>I'd like to make a variable out of each of the links <code>.attr('href');</code> for use in a special little GUI piece that I'm adding within the guts of the plugin. Essentially, I'm building a URL to make a pop-out window and need to give each instance of the <code>$player</code> it's own link that will correspond to a subfolder on the site.</p> <p>Unfortunately, this one is just digging around the source and a lot of the techniques/methods involved are just over my head. For what it's worth, I did try this myself for a good long while before I decided to ask here. You'll find on line <code>134</code> that the player's source is set. This is in the HTML5 driver instead of the Flash one.. so It's not quite ideal but on the right track.</p> <p>Where on earth is each links <code>href</code> brought in and manipulated? Driving me crazy!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload