Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).ready(function( $ ) {
- let post = $('.pop-n .jet-posts__item');
- let isActive = false;
- let postUrl = $(this).find('a.btn').attr('href');
- let result;
- let header = $(this).find('.entry-title > a').text().substring(0, 70) + "...";
- post.click( function(event) {
- result = null;
- event.preventDefault();
- $.ajax({
- type: 'POST',
- url: postUrl,
- success: function (res) {
- result = jQuery.parseJSON(res);
- $('#esket').find('a').trigger('click');
- start();
- },
- error: function () {
- alert("error");
- }
- });
- });
- function start() {
- setTimeout(function() {
- if ( $('#jet-popup-542').hasClass('jet-popup--show-state') ) {
- alert();
- $('#jet-popup-542').find('h2').text(header);
- $('#sp-1').find('.elementor-tab-content').text(result.who);
- $('#sp-2').find('.elementor-tab-content').text(result.documents);
- $('#sp-3').find('.elementor-tab-content').text(result.how);
- $('#sp-4').find('.elementor-tab-content').text(result.where);
- } else {
- start();
- }
- }, 2000);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment