Uname: Linux webm012.cluster130.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 8.0.30 [ PHP INFO ] PHP os: Linux
Server Ip: 145.239.37.162
Your Ip: 216.73.216.190
User: dreampi (1009562) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : wishlist.js
(function ($) {
    'use strict';

    $(document).on('click', '.motiox_add_to_wishlist.add-wishlist', function (event) {

        event.preventDefault();

        var $button = $(this);
        var bookId = $button.data('book-id');

        if (bookId) {
            $.ajax({
                url: motioxAjax.ajaxurl,
                type: 'post',
                data: {
                    action: 'ba_ajax_update_wishlist',
                    bookId: bookId
                },
                beforeSend: function () {
                    $button.addClass('loading');
                },
                success: function (data) {
                    setTimeout(function () {
                        $button.removeClass('loading');
                    }, 1000);
                    if (data.result) {
                        $button.addClass('in-wishlist').removeClass('add-wishlist');
                        $button.prop('href', data.wishlist_link);
                        $('#content .babe_shortcode_block').append('<div id="showNotice">' + data.added_text + '</div>');
                        setTimeout(function () {
                            $('#showNotice').remove();
                        }, 2000);
                        $button.tooltipster('content', data.wishlist_text);
                    }
                },
            });
        }
    });

    $(document).on('click', '.motiox_add_to_wishlist.in-wishlist', function (event) {

        event.preventDefault();
        var page_wishlist = $(this).attr('href');
        $(location).attr('href', page_wishlist);
    });

    $(document).ready(function () {
        $('.motiox_add_to_wishlist').tooltipster();
        $('.motiox_add_to_wishlist.login-acount').magnificPopup({
            type: 'inline',
            midClick: true
        });
    });


    $(document).on('click', '.motiox-wishlist-remove', function (event) {

        event.preventDefault();

        var $button = $(this);
        var bookId = $button.data('book-id');

        if (bookId) {
            $.ajax({
                url: motioxAjax.ajaxurl,
                type: 'post',
                data: {
                    action: 'ba_ajax_remove_wishlist',
                    bookId: bookId
                },
                beforeSend: function () {
                    $button.addClass('loading');
                },
                success: function (data) {
                    setTimeout(function () {
                        $button.removeClass('loading');
                    }, 1500);
                    location.reload(true);
                },
            });
        }
    });

})(jQuery);
© 2026 GrazzMean-Shell