Mouse-over popup on events list

This topic contains 2 replies, has 2 voices, and was last updated by  Stephen Harris 10 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9327

    Hello, my customer would like a simple mouse-over popup like on the calendar view for the list-view. Is this possible, or could this be implemented? Thanks you for your response!
    All the best, Jeroen

    Jeroen Verkarre
    #9328
    Jeroen Verkarre
    #9347

    Hi Jeroen,

    Yes this would be possible, but the details of how are probably a bit to much for me to provide here so I’ll provide outlline:

    1. Create a javascript file which initialises the tooltip (The front-end calendar uses q-tip2). You don’t have to load the q-tip2 library or anything, just the code to initialises it. The examples on the qtip2 (e.g.: http://jsfiddle.net/craga89/G2sqU/) usually involve HTML mark-up – this is step 4)

    2. Register it, specifying the q-tip library (included in EO) as a dependency (the following assumes the above javascript file is in your theme folder and named ‘jeroen-tooltip.js’.

    add_action( 'init', 'jeroen_register_scripts', 15 );
    function jeroen_register_scripts(){
        wp_register_script( 
            'jeroen-tooltip', 
            get_stylesheet_directory_uri() . '/jeroen-tooltip.js',
           array( 'jquery', 'eo_qtip2' ),
           '1.0'
         );
     }

    3./ Load script and styles

    add_action( 'init', 'jeroen_enqueue_scripts', 15 );
    function jeroen_enqueue_scripts(){
        wp_enqueue_script( 'jeroen-tooltip' );
        wp_enqueue_style( 'eo_front' );
     }

    4./ Edit the template to include the mark-up of the tooltip (as mentioned in step 1).

    Steps 2&3, can go in functions.php. But all of the above would work in a separate plug-in with a bit of editing. 4 involves copying the (shortcode event list) template into your theme and editing it there.

    Stephen Harris
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.