Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript How to add a tooltip

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #43091
    dani555
    Participant

    Hi everybody
    How can I add a tooltip for all images as small thumbnails
    My Site
    All the small images I want to appear in the same text picture Viewer
    I don’t know how it can be done with a plugin or code
    Can someone help me
    Thank you!

    #126660
    Kitty Giraudel
    Participant

    You may want to have a look at http://kushagragour.in/lab/hint/.

    #126666
    dani555
    Participant

    Hi Hugo Giraudel
    Thanks for the site
    How should I do for my site
    How to edit my site
    I want the text to appear in print exactly as in the picture example
    For all small pictures thumbnails
    Thank you!

    #126671
    PicnicTutorials
    Participant

    @HugoGiraudel Those are nice. Yours? Here is the one I made. http://www.websitecodetutorials.com/code/css/css3-animated-tooltip-cross-browser.php

    #126673
    Kitty Giraudel
    Participant

    No, HintCSS is from [Kushagra Gour](https://twitter.com/chinchang457).

    #126678
    DADE
    Participant

    You can create new element with absolute position, get user mouse coords and attach it to mouse with some margins when your image is hovered.

    #126684
    dani555
    Participant

    Hi everybody
    What code to put in the css style
    How to edit the functions.php
    In functions.php I have following code
    >
    if (!function_exists(‘theme_get_post_thumbnail’)){
    function theme_get_post_thumbnail($args = array()){
    global $post;

    $size = theme_get_array_value($args, ‘size’, array(theme_get_option(‘theme_metadata_thumbnail_width’), theme_get_option(‘theme_metadata_thumbnail_height’)));
    $auto = theme_get_array_value($args, ‘auto’, theme_get_option(‘theme_metadata_thumbnail_auto’));
    $featured = theme_get_array_value($args, ‘featured’, theme_get_option(‘theme_metadata_use_featured_image_as_thumbnail’));
    $title = theme_get_array_value($args, ‘title’, get_the_title());

    $result = ”;

    if ($featured && (function_exists(‘has_post_thumbnail’)) && (has_post_thumbnail())) {
    ob_start();
    the_post_thumbnail($size, array(‘alt’ => ”, ‘title’ => $title));
    $result = ob_get_clean();
    } elseif ($auto) {
    $attachments = get_children(array(‘post_parent’ => $post->ID, ‘post_status’ => ‘inherit’, ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘order’ => ‘ASC’, ‘orderby’ => ‘menu_order ID’));
    if($attachments) {
    $attachment = array_shift($attachments);
    $img = wp_get_attachment_image_src($attachment->ID, $size);
    if (isset($img[0])) {
    $result = ‘‘;
    }
    }
    }
    if($result !== ”){
    $result = ‘

    ‘;
    }
    return $result;
    }
    }>
    At each image thumbnail viewer want to defend the text picture
    Thanks to all

    #126874
    dani555
    Participant

    Does anyone know how to make 3 weeks all I’m looking for
    Thank you!

    #127654
    dani555
    Participant

    Hi everybody
    I created a tooltip for my site
    [Site link](http://www.retete-super.ro/placinta-cu-branza/ “”)
    How to add html code for thumbanil
    Example Code Html
    p a class=”hint–left hint–warning” data-hint=”This is a warning tooltip”>You did something wrong!

    I want to appear text for images thumbnails 150×150 px in home page
    Thank you

    #127655
    dani555
    Participant
Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.