jTip: jQuery Custom Tool Tip
<script type="text\javascript" src="jquery.js"></script>
<script src="<span class=" type="text\javascript"></script>
jtip="j: my name is rupesh please visit my website <a style="cursor: hand;" href="#">My Home Page</a>" runat="server" Text="Button" />
Button1.Attributes.Add("jtip", "j: My name is rupesh....This is custom <a href='#'>ToolTip</a>");
[/sourcecode]</p>
The only thing you have to do is before writing your tool tip things just prepend it with j: (j colon). This is the only pattern that you have to follow. Below is the jTip.js code:</span></div>
<span style="font-size: small;">
$(function( ) {
$("[jtip^=j:]").wrap("<span class="jtipHost">");</span>
$(".jtipHost").hover(function(){//debugger;
$(this)
.append($('<span style="font-size: small;"><span style="font-size: small;">jtipcontainer">'+$(this).find("[jtip^=j:]").attr("jtip").replace('j:','')+' '))</span></span>
.find('.jtipcontainer').css("left", $(this).position().left + 20)
.css("top", $(this).position().top + $(this).height())
.fadeIn(500);
}
, function() {//debugger;
$(".jtipcontainer").fadeTo(400,.3, function() { $(this).remove(); });
});
});</span></span></p>
<span style="font-size: small;"></span>[/sourcecode]
</div>
Comments