私は現在、自分のサイトにコンテンツロックシステムを実装しようとしています。その一環として、ユーザーがオファーを完了するまで、オンサイトのmp3プレーヤーをロックアウトしたいと考えています。
したがって、ページが読み込まれるとプレーヤーが表示されますが、クリックしようとするとコンテンツロッカーがポップアップし、オファーが完了すると、DIVを完全に使用可能なプレーヤーに交換します。
コードは次のとおりです。
<div id="mobmp3">
<div id="yoursecDiv" style="display:block; z-index: 999;"> <a href="javascript:void(0)" onclick="var fileref=document.createElement('script');fileref.setAttribute('type','text/javascript'); fileref.setAttribute('src', 'http://c.themixtapesite.com/locker.js?guid=0512eafd69b18d22');document.body.appendChild(fileref); setTimeout(yourFunction, 3000);">
<iframe src="http://themixtapesite.com/wp-content/plugins/amazon-s3-cloud-mp3-player/html5/html5mob2.php?bucket=mixtape2" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" width="97.4%" height="280" max-width="97.4%">
</iframe>
</a>
</div>
</div>
<!-- Place the Real Link within yourfirDiv which is set to not display
until yourFunction has been executed. -->
<div id="yourfirDiv" style="display:none;">
<iframe src="http://themixtapesite.com/wp-content/plugins/amazon-s3-cloud-mp3-player/html5/html5mob2.php?bucket=mixtape2"
frameborder="0" marginheight="0" marginwidth="0" scrolling="no" width="97.4%"
height="280" max-width="97.4%"></iframe>
</div>
ご覧のとおり、内にiframe(プレーヤー)をロードしようとしていますyoursecDiv
。次に、オファーが完了するyourfirDiv
と、同じプレーヤーであるがコンテンツロッカーがないリロードが行われます。
タグでラップすることでこれを達成できると期待してい<iframe>
ました<a>
が、残念ながら機能しません。
だから私は私の質問だと思います:コンテンツロッカーを開くためのリンクとして機能するようにiframe上にdiv(または何か)をオーバーレイする方法はありますか?