Commit f8567556 by lmf

优化js文件

parent f1e63aea
var config = {
paths : {
'smartphoto': 'Magento_Catalog/js/smartphoto.min'
},
shim : {
'smartphoto' : {
deps: ['jquery']
}
}
};
......@@ -38,19 +38,13 @@
</div>
<?php endif; ?>
<script>
console.log("js is work!")
require([
'jquery'
], function ($) {
console.log("jquery is work!")
setTimeout(function(){
$("#tab-label-reviews").trigger("click");
},1000);
},3000);
});
let e = document.createEvent('MouseEvents');
e.initEvent('click', true, true);
setTimeout(function(){
document.getElementById('tab-label-reviews').dispatchEvent(e);
},1000);
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment