HEX
Server: nginx/1.18.0
System: Linux vcwordpress 5.15.0-174-generic #184-Ubuntu SMP Fri Mar 13 18:41:50 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/soreal.space/wp-content/plugins/image-on-select/js/ios-script.js
jQuery(document).ready(function($) {
    const colorOptions = {
        1: {
            title: 'CENTER TABLE',
            model: 'Model size: 4\'1" x 2\'0" x 0\'5"',
            variations: [
                { color: '#ddd', image: 'how-it-works-2.png' },
                { color: 'gray', image: 'how-it-works-3.png' },
                { color: '#eba611', image: 'how-it-works-4.png' },
                { color: '#9747ff', image: 'how-it-works-4.png' },
                { color: '#0d99ff', image: 'how-it-works-5.png' }
            ]
        },
        2: {
            title: 'SOFA',
            model: 'Model size: 4\'1" x 2\'0" x 0\'5"',
            variations: [
                { color: '#ddd', image: 'how-it-works-2.png' },
                { color: 'gray', image: 'how-it-works-3.png' },
                { color: '#eba611', image: 'how-it-works-4.png' },
                { color: '#9747ff', image: 'how-it-works-4.png' },
                { color: '#0d99ff', image: 'how-it-works-5.png' }
            ]
        },
        3: {
            title: 'CARPET',
            model: 'Model size: 4\'1" x 2\'0" x 0\'5"',
            variations: [
                { color: '#ddd', image: 'how-it-works-2.png' },
                { color: 'black', image: 'how-it-works-3.png' },
                { color: 'grey', image: 'how-it-works-4.png' },
                { color: 'pink', image: 'how-it-works-4.png' },
                { color: 'blue', image: 'how-it-works-5.png' }
            ]
        }
    };

    $('.plus-button').hover(function() {
        var buttonId = $(this).data('id');
        var position = $(this).position();
        var buttonHeight = $(this).outerHeight();

        var optionsHtml = `
            <div class="color-options-title">${colorOptions[buttonId].title}</div>
            <div class="color-options-model">${colorOptions[buttonId].model}</div>
            <div class="color-options-variation">Variation:</div>
            <div class="color-options">
                ${colorOptions[buttonId].variations.map(option => 
                    `<div class="color-option" data-image="${option.image}" style="background-color: ${option.color};"></div>`
                ).join('')}
            </div>`;

        $('#color-options-container').html(optionsHtml).css({
            top: position.top + buttonHeight + 5,
            left: position.left,
            display: 'block'
        }).data('button-id', buttonId);
    }, function() {
        $('#color-options-container').hide();
    });

    $('#color-options-container').hover(function() {
        $(this).show();
    }, function() {
        $(this).hide();
    });

    $(document).on('click', '.color-option', function() {
        var selectedImage = $(this).data('image');
        $('#main-image').attr('src', ios_images_path.path + selectedImage);
        $('#color-options-container').hide();
    });
});