Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
linking to the forum page and tooltip css
Avatar
Shane Stegeman
Member
Free Members
sp_UserOfflineSmall Offline
Mar 22, 2016 - 9:41 am

ok thanks heaps. I think I have figured out the css and I will enqueue the Jquery libraries you mentioned.

1. But, I just cant figure out the java script code needed. Could you please tell me what code goes in the javascript file? This of course I will enqueue too.

 

2. Is this all the css for tooltips

.ttip {
    background: blue;
    color: red;
    font-family: inherit;
    font-size: 0.85em;
    line-height: 1.2em;
    max-width: 300px;
    padding: 8px;
    position: absolute;
    z-index: 999999;
}
body .ttip {
    border: 1x solid #ffffff;
}

 

Thanks heaps

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 22, 2016 - 10:00 am

Yes - the .ttip class should be all you need. At least as far as I am aware.

The Script to initialise it - 

jQuery(document).tooltip( {
    tooltipClass: "ttip",
    position: {
        my: "left+20 top",
        at: "left bottom+10"
    },
    track: false,
    content: function() {
        var element = jQuery(this);
        if (element.prop("nodeName") == "IFRAME") {
            return '';
        } else {
            return element.attr( "title" );
        }
    }
});

try that...

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620