登录弹出窗口未显示在移动网站上 [英] Login Popup not Showing on Mobile Site

查看:69
本文介绍了登录弹出窗口未显示在移动网站上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WordPress网站上工作: http://goo.gl/3VONrG

Working on WordPress site: http://goo.gl/3VONrG

Ajax遇到了几个问题,不确定是否与此有关.

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?

谢谢.

推荐答案

结果我忘了在标题中添加指向所需.js文件的链接.

Turns out I was forgetting to add links to the required .js files in the header.

这篇关于登录弹出窗口未显示在移动网站上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆