如何点击其他按钮/链接? [英] How to click another button/link?
问题描述
我有一个ASP.NET 网络商店,它是从头部,身体和脚部编译而来的。在头上我有迷你图表。当客户在购物车中添加一些产品(正文中的添加到购物车按钮)时,我想打开迷你车2秒钟。我怎么做?
我试过jquery,就像那样
Hi,
I have an ASP.NET web store, which is compiled from head, body and foot. In head i have mini chart. When the customer add some product in cart ("Add to Cart" button in body), i want to open minicart for 2 second. How i can do that?
I tried with jquery, like that
$(document).on( "click", '#AddToCartBtn', function(e){
$('.btn-slide2').trigger(e.type);
});
但它不起作用。
也许问题是,因为最终网站由三个不同的文件组成。
谢谢
but it doesnt work.
Maybe the problem is, because the end site is composed of three different documents.
Thanks
推荐答案
( document )。on( 点击,' #AddToCartBtn' ,功能(e ){
(document).on( "click", '#AddToCartBtn', function(e){
(' 。btn-slide2')。触发器(e.type);
});
('.btn-slide2').trigger(e.type); });
但它不起作用。
也许问题是,因为最终网站由三个不同的文件组成。
谢谢
but it doesnt work.
Maybe the problem is, because the end site is composed of three different documents.
Thanks
..或者您可能需要使用以下内容
..or you might need to use the following thing instead
// upon document load
这篇关于如何点击其他按钮/链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!