Issue
As stated in the title I'm having some issues with my JS.
js:
$("#bg2InsideFb").click(function () {
$("#fbLink").click();
});
html:
<div id="bg2InsideFb">
<p id="fbIcon">
<img src="@routes.Assets.at("images/mobile/login/fblogin-ico.png")" alt="Facebook"/>
</p>
<p class="pl20">
<a id="fbLink" href="@fb.authenticationUrl"> @Messages("review.form.facebook.login") </a>
</p>
</div>
<p class="floatleft f13">
@Messages("review.form.facebook.term")
</p>
This results Chrome to crash and Firefox to throw a too much recursion error. What is happening and how do I solve this?
Solution
Ok I did it like this since the propagation solution did not work for me.
$(function () {
$("#bg2InsideFb, #bg2InsideG").click(function () {
var tmpLink = $(this).find("a").attr("href");
window.location.href = tmpLink;
});
});
Answered By - jakob
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.