【问题标题】:href does not redirect to home pagehref 不重定向到主页
【发布时间】:2018-01-14 18:30:23
【问题描述】:

this.$href = $( 'Visit website' ) 不会将我带到 home.html。访问网站按钮不会将我带到 home.html。它什么也不做。我该如何解决?请帮忙。

Preview.prototype = {
    create : function() {
        // create Preview structure:
        this.$title = $( '<h3></h3>' );
        this.$description = $( '<p></p>' );
        this.$href = $( '<a href="home.html">Visit website</a>' );
        this.$details = $( '<div class="og-details"></div>' ).append( this.$title, this.$description, this.$href );
        this.$loading = $( '<div class="og-loading"></div>' );
        this.$fullimage = $( '<div class="og-fullimg"></div>' ).append( this.$loading );
        this.$closePreview = $( '<span class="og-close"></span>' );
        this.$previewInner = $( '<div class="og-expander-inner"></div>' ).append( this.$closePreview, this.$fullimage, this.$details );
        this.$previewEl = $( '<div class="og-expander"></div>' ).append( this.$previewInner );
        // append preview element to the item
        this.$item.append( this.getEl() );
        // set the transitions for the preview and the item
        if( support ) {
            this.setTransition();
        }
    }

【问题讨论】:

    标签: javascript html href url-redirection


    【解决方案1】:

    @NEHA 我想我在你的 index.html 文件中找到了解决方案

    <li class="mix app">
                            <a href="/home.html" data-largesrc="img/portfolio/portx1.jpg" data-title="Azuki bean" data-description="Swiss chard pumpkin bunya nuts maize plantain aubergine napa cabbage soko coriander sweet pepper water spinach winter purslane shallot tigernut lentil beetroot.">
                                <img src="img/portfolio/portx1.jpg" alt="Meghna">
                                <div class="hover-mask">
                                    <h3>Azuki bean</h3>
                                    <span>
                                        <i class="fa fa-plus fa-2x"></i>
                                    </span>
                                </div>
                            </a>
                        </li>
    

    在访问网站按钮将重定向之后,在 /home.html 中而不是在网格库中传递 url

    【讨论】:

      猜你喜欢
      • 2018-01-21
      • 1970-01-01
      • 2020-06-27
      • 2011-01-15
      • 1970-01-01
      • 2019-07-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多