jQuery button same function with link -
the jquery is
$(function() { // videothumb css class found in foreach list class="videothumb". ytvideo holder id set div id $(".videothumb4").on('click').ytplaylist({ holderid: 'ytvideo4', html5: true, playerwidth: '520', autoplay: false, sliding: false, listsliding: true, social: true, autohide: false, playfirst: 0, playonload: false, modestbranding: true, showinfo: false }); });
the main clickable link this
<a class="videothumb4" href="http://www.youtube.com/watch?v=' . $yvalue['videoid'] . '"> ' . $yvalue['description'] . ' </a>
then want link button below. same value , function. correct button is
<input class="videothumb4" onclick="ytplaylist();" type="button" name="previewsel" value="preview" id="previewbut">
the sample link yt
since jquery selector function written using css class name, need give same class name element. remove onlick event functionality bounded in ready event.
you missing closing tag button element.
<input class="videothumb4" type="button" name="previewsel" value="preview" id="previewbut" />
Comments
Post a Comment