Support » Plugin: wBounce » Fire wbounce on click?

Viewing 1 replies (of 1 total)
  • After some trial and error with learning about how JQuery works in WordPress, I loaded this script into the header. First the script allows the $ sign to work instead of the compatibility mode where you need to have JQuery instead of the $. Then the script sets the CSS display property to block when the link is clicked:

    
    jQuery(document).ready(function ($) {
        // Make jQuery Work with $ instead of compatibility mode
        // https://premium.wpmudev.org/blog/adding-jquery-scripts-wordpress
        $('.hideable').on('click', function () {
            $(this).hide();
        })
        $('#triggermymodalplease').click(function () {
            $('#wbounce-modal').css('display', 'block');
        });
    });
    

    And this is the HTML for the link to trigger the pop-up to display as block instead of none:

    
    <a id="triggermymodalplease" href="#wbounce-modal" name="triggermymodalplease">Click to show the wBounce Modal</a>
    
Viewing 1 replies (of 1 total)
  • The topic ‘Fire wbounce on click?’ is closed to new replies.