mardi 22 avril 2014

jquery-mobile and stopping on ajax request in my rails app


Vote count:

0




I'm using JQuery mobile to build my rails app (ruby 2, rails 4).


Users can log in with Facebook:



<%= link_to "Log in with Facebook", user_omniauth_authorize_path(:facebook), class: "custom-btn" %>


It works fine when I disable JQuery mobile - when I comment out the line in my application.html.erb:



<%= javascript_include_tag "http://ift.tt/1hqJ3aY" %>


But with jquery mobile being used I get the error, when I click the 'Log in with FB' button: 'error loading page'.


I think this is because a callback is being initiated to the FB site, which Jquery Mobile doesn't like, as ajax is used by default, and it wants everything to stay within my domain. So I'm trying to disable ajax for this request. In the jquery mobile support docs it says this can be done with:



data-ajax="false"


But what is the syntax for my button? I've tried lots of different things like:


but it just gives me errors. Any ideas would be appreciated, thanks.



asked 33 secs ago






Aucun commentaire:

Enregistrer un commentaire