$('#song-link').change(function () {
var link = $('#song-link').val();
SC.oEmbed(link, {
element: document.getElementById('putTheWidgetHere')
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://connect.soundcloud.com/sdk/sdk-3.1.2.js"></script>
<input id="song-link" placeholder="Paste Soundcloud link here" name="song_link" type="text">
<div id="putTheWidgetHere"></div>
Experiencing an issue with adjusting the height of the Soundcloud link preview. Attempted using addClass()
and css()
methods but to no avail. Looking to change the height from 400px
to 200px
.
Struggling to identify the event that triggers these functions as the height adjustment should occur after the Soundcloud link is pasted into the input text field and loads in the iframe
that Soundcloud utilizes.