Working on WordPress site: http://goo.gl/3VONrG
It has had a couple problems with Ajax, not sure if that relates to this.
Login pop-up works on desktop site but not on mobile site.
Here is the menu code for the button on the menu.
<li>
<a id="requestLogin" class="login-modal bg-btn-header btn-header" rel="modal-box" href="#login" title="<?php _e('Login', ET_DOMAIN);?>">
<span class="icon" data-icon="U" rel=""></span>
</a>
</li>
Found this code linked on the desktop site:
// View: Header
JobEngine.Views.Header = Backbone.View.extend({
el: 'header',
modal_login: {},
modal_register: {},
modal_forgot_pass: {},
templates: {
'login': '<li><a id="requestLogin" class="login-modal header-btn bg-btn-header" href="#login"><span class="icon" data-icon="U"></span></a></li>',
'auth': _.templateSettings = {
evaluate : /<#([\s\S]+?)#>/g,
interpolate : /\{\{(.+?)\}\}/g,
escape : /<%-([\s\S]+?)%>/g
},
'auth': _.template('<li><a href="{{ profile_url }}" class="bg-btn-header header-btn"><span class="icon" data-icon="U"></span></a></li>' +
'<li><a href="' + et_globals.logoutURL + '" id="requestLogout" class="bg-btn-header header-btn"><span class="icon" data-icon="Q"></span></a></li>')
},
events: {
'click a#requestLogout': 'doLogout',
'click a#requestLogin': 'doLogin',
'click a.requestlogin': 'doLogin',
'click a#requestRegister': 'doRegister'
},
initialize: function() {
if (!this.modal_login || !(this.modal_login instanceof JobEngine.Views.Modal_Login)) {
this.modal_login = new JobEngine.Views.Modal_Login();
}
if (!this.modal_register || !(this.modal_register instanceof JobEngine.Views.Modal_Register)) {
this.modal_register = new JobEngine.Views.Modal_Register();
}
if (!this.modal_forgot_pass || !(this.modal_forgot_pass instanceof JobEngine.Views.Modal_Forgot_Pass)) {
this.modal_forgot_pass = new JobEngine.Views.Modal_Forgot_Pass();
}
},
updateAuthButtons: function() {
if (!JobEngine.app.currentUser.isNew()) {
this.$('div.account ul').html(this.templates.auth(JobEngine.app.currentUser.attributes));
} else {
this.$('div.account ul').html(this.templates.login);
}
pubsub.trigger('afterUserChange', JobEngine.app.currentUser.isNew());
},
doLogout: function(e) {
e.preventDefault();
pubsub.trigger('je:request:logout');
JobEngine.app.auth.doLogout();
},
doLogin: function(e) {
e.preventDefault();
pubsub.trigger('je:request:auth');
},
doRegister: function(e) {
e.preventDefault();
pubsub.trigger('je:request:register');
}
});
How do I apply this code to the mobile site?
Thanks in advance.
Turns out I was forgetting to add links to the required .js files in the header.