使用fullpage.js和createIT jQuery Paypal HTML Shop。我的网站上有几个元素。使用以下方法时:
r.on("click touchend", function(r) {
一切正常,并将1个元素添加到购物车。
现在我需要动态删除和添加元素,并试图使用:
$(document).on('click touchend', r, function (r){
但是这会将所有元素添加到购物车吗?
任何想法该如何处理,以及为什么两者之间有区别?或如何制作
r.on("click touchend", function(r) {
如果元素添加到文档是永久的?
谢谢
$(document).on('click touchend', ".ct-product-button", function (r){
r.stopImmediatePropagation(),
r.preventDefault(),
这就是我的工作。