jsapiによって生成されたLinkedInボタンのトリガーを作成しようとしています。デスクトップブラウザでは完璧に機能しますが、モバイルブラウザ(iOS、Androidブラウザ)では機能しません。
コードは次のとおりです。
HTML:
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: i6fpkmpak7qu
authorize: true
</script>
<a href="#ln" title="Autentificare cu LinkedIn" id="sidebar_auth_ln" class="ln_auth_link"></a>
<div class="hidden_ln_login_holder">
<script type="IN/Login" data-onAuth="onLinkedInAuth"></script>
</div>
Javascript:
$(document).ready(function(){
$('.ln_auth_link').click(function() {
DIV = $(this).next();
$('a span:first', DIV).live('click', function() { return true; });
// also tried $('a span:first', DIV).click();, $('a span:first', DIV).trigger('click')
return false;
});
});
上で述べたように、これはモバイルの問題のみです。さらに、このコードを使用する場合
alert($('a span:first', DIV).html());
デスクトップブラウザと同じように、「ln」がポップアップ表示されます。
また、パーツを非表示にせずに右にタップすれば、ログインは問題なく機能します。
コードが公開されているアドレスは次のとおりです:http:// test [dot] lacontabil [dot] ro
何か案は?ありがとうございました!