I'm trying to create a trigger for the linkedin button generated by the js api. It works perfect in desktop browsers but on mobile browsers (ios, android browser) it doesnt work.
Here is the code:
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;
});
});
As I mentioned above, this is a mobile issue only. Plus, if i use this code
alert($('a span:first', DIV).html());
it pops up "ln", just like in the desktop browser.
Also, the login works without problems if I don't hide the part and I tap right on it.
Here's the address where the code is live: http://test[dot]lacontabil[dot]ro
Any ideas? Thank you!
you can call that on click on custom button