未捕获的DOMException:错误:隐藏的'不是有效的选择器

时间:2019-01-12 18:23:02

标签: javascript jquery webpack

单击按钮时,我试图加载更多项目。代码返回错误: 未捕获的DOMException:无法对'Document'执行'querySelectorAll':'.moreArticle:hidden'不是有效的选择器。

function Container({ location }) {
    return (
        <div>
            <Switch location={location}>
                <Route path="/productsList" component={ProductList} />
                <Route path="/customersList" component={CustomersList} />
                <Route path="/appointmentsList" component={AppointmentsList} />
                <Route exact path="/annotationList" component={AnnotationList} />
                <Route path="/annotationList/annView/:id" component={annView} />
                <Route path="/addProduct" component={AddProduct} />
            </Switch>
        </div>
    );
}

还有我的javascript:

        <div class="articles col-lg-10 offset-lg-2">

            <div class="article moreArticle col-lg-5">
                <h3>Workshop k tématu  spolufinancovaných projektů z ESI fondů</h3> 
                <p>28/12/2018</p>
            </div>
            <div class="article moreArticle col-lg-5" style="display: none;">
                <h3>Workshop k tématu  spolufinancovaných projektů z ESI fondů</h3> 
                <p>28/12/2018</p>
            </div>
            <div class="article moreArticle col-lg-5" style="display: none;">
                <h3>Workshop k tématu  spolufinancovaných projektů z ESI fondů</h3> 
                <p>28/12/2018</p>
            </div>

             <div id="loadMore" style="">
                <a href="#">Načíst další články</a>
             </div>

        </div>

我在webpack中使用Cash-dom运行它。知道代码有什么问题吗?

0 个答案:

没有答案