Hi Karl,
              I did use onActivate and return false. But now what
happen is that when user click again on link to turn tool tip on. Half
of the tool tips not getting text in it. They just displaying empty
div even no title on top (jtip) where as rest half are showing and
it's happening randomly like same link next time display tool tip but
few other don't.

Is anything I am missing or not doing right ?

/**
Function to turn tooltip on or Off
**/
function turnTooltip(status){
        if(status=="on"){
                displayToolTips();// Function that display tool tips.
                var innercontent="<div  onClick=\"turnTooltip('off');\"
id='innerTooltipDiv'><img src='http://"+location.hostname+"/resources/
images/tooltip.png' width='28px'/> TURN TOOLTIP OFF</div>";
                $('#tooltipControl').html(innercontent);
        }
        else{
                hideToolTips();// Function that hide tool tips.
        }
}

function displayToolTips(){
        $(document).ready(function(){
                $('#closeScreen').cluetip(
                {
                        cluetipClass:     'jtip',// class added to outermost 
clueTip div
                        arrows: true, //display the arrow at proper place
                        splitTitle: '|', // use the invoking element's title 
attribute to
populate the clueTip...
                        // ...and split the contents into separate divs where 
there is a
"|"
                        showTitle: false, // hide the clueTip's heading
                        onActivate: function(e) {
                                return true;
                        }
                });

                $('#tooltipControl').cluetip(
                {
                        cluetipClass:     'jtip',// class added to outermost 
clueTip div
                        arrows: true, //display the arrow at proper place
                        splitTitle: '|', // use the invoking element's title 
attribute to
populate the clueTip...
                        // ...and split the contents into separate divs where 
there is a
"|"
                        showTitle: false, // hide the clueTip's heading
                        onActivate: function(e) {
                                return true;
                        }
                });

                $('#reportError').cluetip(
                {
                        cluetipClass:     'jtip',// class added to outermost 
clueTip div
                        arrows: true, //display the arrow at proper place
                        splitTitle: '|', // use the invoking element's title 
attribute to
populate the clueTip...
                        // ...and split the contents into separate divs where 
there is a
"|"
                        showTitle: false, // hide the clueTip's heading
                        onActivate: function(e) {
                                return true;
                        }
                });

                $("input").cluetip(
                {
                        cluetipClass:     'jtip',// class added to outermost 
clueTip div
                        arrows: true, //display the arrow at proper place
                        splitTitle: '|', // use the invoking element's title 
attribute to
populate the clueTip...
                        // ...and split the contents into separate divs where 
there is a
"|"
                        showTitle: false, // hide the clueTip's heading
                        onActivate: function(e) {
                                return true;
                        }
                });

                //              $("select").cluetip(
                //              {
                //                      cluetipClass:     'jtip',// class added 
to outermost clueTip
div
                //                      arrows: true, //display the arrow at 
proper place
                //                      splitTitle: '|', // use the invoking 
element's title attribute
to populate the clueTip...
                //                      // ...and split the contents into 
separate divs where there is
a "|"
                //                      showTitle: false // hide the clueTip's 
heading
                //
                //              });
                $("a").cluetip(
                {
                        cluetipClass:     'jtip',// class added to outermost 
clueTip div
                        arrows: true, //display the arrow at proper place
                        splitTitle: '|', // use the invoking element's title 
attribute to
populate the clueTip...
                        // ...and split the contents into separate divs where 
there is a
"|"
                        showTitle: false, // hide the clueTip's heading
                        onActivate: function(e) {
                                return true;
                        }
                });
        });
}

/**
Function that hide tool tips
**/
function hideToolTips()
{
        var innercontent="<div  onClick=\"turnTooltip('on');\"
id='innerTooltipDiv'><img src='http://"+location.hostname+"/resources/
images/tooltip.png' width='28px'/> TURN TOOLTIP ON</div>";
        $('#tooltipControl').html(innercontent);
        $('#closeScreen').cluetip({
                cluetipClass:     'jtip',// class added to outermost clueTip div
                arrows: true, //display the arrow at proper place
                splitTitle: '|', // use the invoking element's title attribute 
to
populate the clueTip...
                // ...and split the contents into separate divs where there is 
a "|"
                showTitle: false, // hide the clueTip's heading
                onActivate: function(e) {
                        return false;
                }
        });
        $('#tooltipControl').cluetip({
                cluetipClass:     'jtip',// class added to outermost clueTip div
                arrows: true, //display the arrow at proper place
                splitTitle: '|', // use the invoking element's title attribute 
to
populate the clueTip...
                // ...and split the contents into separate divs where there is 
a "|"
                showTitle: false, // hide the clueTip's heading
                onActivate: function(e) {
                        return false;
                }
        });
        $('#reportError').cluetip({
                cluetipClass:     'jtip',// class added to outermost clueTip div
                arrows: true, //display the arrow at proper place
                splitTitle: '|', // use the invoking element's title attribute 
to
populate the clueTip...
                // ...and split the contents into separate divs where there is 
a "|"
                showTitle: false, // hide the clueTip's heading
                onActivate: function(e) {
                        return false;
                }
        });
        $('input').cluetip({
                cluetipClass:     'jtip',// class added to outermost clueTip div
                arrows: true, //display the arrow at proper place
                splitTitle: '|', // use the invoking element's title attribute 
to
populate the clueTip...
                // ...and split the contents into separate divs where there is 
a "|"
                showTitle: false, // hide the clueTip's heading
                onActivate: function(e) {
                        return false;
                }
        });
        $('a').cluetip({
                cluetipClass:     'jtip',// class added to outermost clueTip div
                arrows: true, //display the arrow at proper place
                splitTitle: '|', // use the invoking element's title attribute 
to
populate the clueTip...
                // ...and split the contents into separate divs where there is 
a "|"
                showTitle: false, // hide the clueTip's heading
                onActivate: function(e) {
                        return false;
                }
        });

}

Reply via email to