Sugama's Tech BLOG

Stripe Calendar

Sep, 2010
Aug 1516171819202122232425262728293031 Sep 123456789

Infomation

Sugama's Tech BLOG

Javascript - newtooltip version 0.1

08.10.19 Comments(0) Post Comment

I developed a jquery plugin called jquery.newtooltip.js which is a revamped version of jquery.tooltip.js. It has been added some option, such as on/off handler, AJAX supports.

Hear is a working example.

By seting up as follows, every tags with title attribute obtains the ability of showing tooltips, and this is the easiest way to use newtooltip.js.

// Easiest way to use
$(document).ready(function(){
    
    $('.target').tooltip_setup();
});

Options(following values are default)

// Options
$.tooltip_setup({
    in_json     : false,        // use of json format
    auto        : true,         // use of title attribute
    handler_on  : 'mouseover',  // handler for showing tooltip
    handler_off : 'mouseout',   // handler for hiding tooltip
    track       : true,         // tracking mousemove
    fade        : 200,          // fade(msec)
    top         : 15,           // vertical distance from pointer
    left        : 15,           // horizontal distance from pointer
    id          : "TOOLTIP"     // ID for tooltip
    auto_css    : true,         // activate default CSS
});

newtooltip.min.js
PACKED File.

newtooltip.org.js
UNPACKED File.

Comments

no comment exists

Form