1

I have a form (in template file) in a Django app, like this:

<li>
  <form action="{% url 'socialauth_begin' 'facebook' %}?{{ redirect_querystring }}" method="get">
     <input type="hidden" name="next" value="{{ request.get_full_path }}">
     <a href="#" onclick="$(this).parent().submit();return false;"><img class="loggin" src="../img/fb-loggin.png" alt="loggin"></a>
  </form>
</li>

The problem is this form works on most devices except touch devices like iPhone, iPad... Please give me an idea. Many thanks! :)

Take a look to my website for more details: http://truyenyy.com

suckerlynch
  • 25
  • 1
  • 5
  • See these answers: http://stackoverflow.com/questions/7018919/how-to-bind-touchstart-and-click-events-but-not-respond-to-both – powtac Jan 07 '13 at 08:39

2 Answers2

1

Try to use <a href="javascript:void(0);" instead of <a href="#". Also take a look at this link

Community
  • 1
  • 1
Morpheus
  • 8,829
  • 13
  • 51
  • 77
0

This word for me! xD

    $('#sex').bind('touchstart click', function(){
       $(this).parent().submit();
       return false
    });
suckerlynch
  • 25
  • 1
  • 5