# merchant/2.3.0/assets/js/modal.min.js

Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together &amp; More for WooCommerce – Merchant, version 2.3.0. 1 lines.

- Page: https://pluginprobe.com/plugins/merchant/2.3.0/code/assets/js/modal.min.js
- Raw: https://pluginprobe.com/plugins/merchant/2.3.0/raw/assets/js/modal.min.js
- Modified: 2026-07-21T16:38:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/merchant/2.3.0/code/assets/js/modal.min.js#L10-L20`.

```javascript
var merchant=merchant||{};merchant.modal={init:function(){var e=this,t=document.querySelectorAll("[data-merchant-modal-trigger]");t.length&&(t.forEach(function(t){t.addEventListener("click",e.openModal)}),document.querySelectorAll("[data-merchant-modal-close]").forEach(function(t){t.addEventListener("click",e.buttonCloseModal)}))},toggleBodyClass:function(){document.body.classList.toggle("merchant-modal-opened")},openModal:function(t){t.preventDefault(),t.stopPropagation();t=this.getAttribute("data-merchant-modal"),t=document.querySelector('.merchant-modal[data-merchant-modal="'+t+'"]');merchant.modal.toggleBodyClass(),t.classList.add("show"),t.addEventListener("click",merchant.modal.closeModal)},closeModal:function(t){null===t.target.closest(".merchant-modal-body")&&(merchant.modal.toggleBodyClass(),this.classList.remove("show"))},buttonCloseModal:function(t){t.preventDefault(),t.stopPropagation();t=this.closest(".merchant-modal");merchant.modal.toggleBodyClass(),t.classList.remove("show")}},document.addEventListener("DOMContentLoaded",function(){merchant.modal.init()});
```
