Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function(e) {
- const $moreLinks = $(".js-more-btn");
- const $modalForm = $("#form-call");
- const $modalTitle = $modalForm.find(".js-modal-title");
- const $modalImage = $modalForm.find(".b-image");
- $moreLinks.on("click", function(e) {
- const title = $(this).data("modtitle");
- const image = $(this).parents(".b-product-card").find("img")[0].src;
- $modalTitle.text(title);
- $modalImage.attr("src", image);
- $("<input>").attr({
- type: "hidden",
- id: "product-type",
- name: "С какой формы пришли",
- value: title
- }).appendTo($modalForm);
- })
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement