67 lines
7.0 KiB
JavaScript
67 lines
7.0 KiB
JavaScript
//Microsoft.Glimmer.OneWay
|
|
//<AnimationCollection FilePath="G:\myprojects\tribe2\glimmer\Glimmer\glimmerUI\glimmerUI\samples\js\tooltip.html.glimmer.js" xmlns="clr-namespace:GlimmerLib;assembly=GlimmerLib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"><Animation Name="mouseoverActiontooltip" EventType="mouseover" Trigger=".tooltip"><Animation.Targets><Target Name="#tooltip" Duration="1000" Easing="linear" Callback="null"><Target.Effects><AppendHTMLEffect CSSName="body" DisplayName="Append HTML" MaxValue="0" MinValue="0" From="0" To="<p id='tooltip'>"+ this.rel + "</p>" IsStartValue="False" IsActive="True" IsAnimatable="False" IsExpression="False" FormatString="$({1}).append({2});
" RequiresJQueryPlugin="False" JQueryPluginURI="" /><ModifyCSSEffect CSSName="left" DisplayName="ModifyCSS" MaxValue="5000" MinValue="-5000" From="0" To="(event.pageX + 20) + "px"" IsStartValue="False" IsActive="True" IsAnimatable="False" IsExpression="True" FormatString="$({0}).css({1},{2});
" RequiresJQueryPlugin="False" JQueryPluginURI="" /><ModifyCSSEffect CSSName="top" DisplayName="ModifyCSS" MaxValue="5000" MinValue="-5000" From="0" To="(event.pageY - 10) + "px"" IsStartValue="False" IsActive="True" IsAnimatable="False" IsExpression="True" FormatString="$({0}).css({1},{2});
" RequiresJQueryPlugin="False" JQueryPluginURI="" /></Target.Effects></Target></Animation.Targets></Animation><Animation Name="mouseoutActiontooltip" EventType="mouseout" Trigger=".tooltip"><Animation.Targets><Target Name="{x:Null}" Duration="1000" Easing="linear" Callback="null"><Target.Effects><RemoveHTMLEffect CSSName="#tooltip" DisplayName="Remove HTML" MaxValue="0" MinValue="0" From="0" To="0" IsStartValue="False" IsActive="True" IsAnimatable="False" IsExpression="False" FormatString="$({1}).remove();
" RequiresJQueryPlugin="False" JQueryPluginURI="" /></Target.Effects></Target></Animation.Targets></Animation><Animation Name="mousemoveActiontooltip" EventType="mousemove" Trigger=".tooltip"><Animation.Targets><Target Name="#tooltip" Duration="1000" Easing="linear" Callback="null"><Target.Effects><ModifyCSSEffect CSSName="left" DisplayName="ModifyCSS" MaxValue="5000" MinValue="-5000" From="0" To="(event.pageX + 20) + "px"" IsStartValue="False" IsActive="True" IsAnimatable="False" IsExpression="True" FormatString="$({0}).css({1},{2});
" RequiresJQueryPlugin="False" JQueryPluginURI="" /><ModifyCSSEffect CSSName="top" DisplayName="ModifyCSS" MaxValue="5000" MinValue="-5000" From="0" To="(event.pageY - 10) + "px"" IsStartValue="False" IsActive="True" IsAnimatable="False" IsExpression="True" FormatString="$({0}).css({1},{2});
" RequiresJQueryPlugin="False" JQueryPluginURI="" /></Target.Effects></Target></Animation.Targets></Animation><Animation Name="mouseoverActiontooltipImage" EventType="mouseover" Trigger=".tooltipImage"><Animation.Targets><Target Name="#tooltip" Duration="1000" Easing="linear" Callback="null"><Target.Effects><AppendHTMLEffect CSSName="body" DisplayName="Append HTML" MaxValue="0" MinValue="0" From="0" To="<p id='tooltip'><img src="+ this.rel + "></img></p>" IsStartValue="False" IsActive="True" IsAnimatable="False" IsExpression="False" FormatString="$({1}).append({2});
" RequiresJQueryPlugin="False" JQueryPluginURI="" /><ModifyCSSEffect CSSName="left" DisplayName="ModifyCSS" MaxValue="5000" MinValue="-5000" From="0" To="(event.pageX + 20) + "px"" IsStartValue="False" IsActive="True" IsAnimatable="False" IsExpression="True" FormatString="$({0}).css({1},{2});
" RequiresJQueryPlugin="False" JQueryPluginURI="" /><ModifyCSSEffect CSSName="top" DisplayName="ModifyCSS" MaxValue="5000" MinValue="-5000" From="0" To="(event.pageY - 10) + "px"" IsStartValue="False" IsActive="True" IsAnimatable="False" IsExpression="True" FormatString="$({0}).css({1},{2});
" RequiresJQueryPlugin="False" JQueryPluginURI="" /></Target.Effects></Target></Animation.Targets></Animation><Animation Name="mouseoutActiontooltipImage" EventType="mouseout" Trigger=".tooltipImage"><Animation.Targets><Target Name="{x:Null}" Duration="1000" Easing="linear" Callback="null"><Target.Effects><RemoveHTMLEffect CSSName="#tooltip" DisplayName="Remove HTML" MaxValue="0" MinValue="0" From="0" To="0" IsStartValue="False" IsActive="True" IsAnimatable="False" IsExpression="False" FormatString="$({1}).remove();
" RequiresJQueryPlugin="False" JQueryPluginURI="" /></Target.Effects></Target></Animation.Targets></Animation><Animation Name="mousemoveActiontooltipImage" EventType="mousemove" Trigger=".tooltipImage"><Animation.Targets><Target Name="#tooltip" Duration="1000" Easing="linear" Callback="null"><Target.Effects><ModifyCSSEffect CSSName="left" DisplayName="ModifyCSS" MaxValue="5000" MinValue="-5000" From="0" To="(event.pageX + 20) + "px"" IsStartValue="False" IsActive="True" IsAnimatable="False" IsExpression="True" FormatString="$({0}).css({1},{2});
" RequiresJQueryPlugin="False" JQueryPluginURI="" /><ModifyCSSEffect CSSName="top" DisplayName="ModifyCSS" MaxValue="5000" MinValue="-5000" From="0" To="(event.pageY - 10) + "px"" IsStartValue="False" IsActive="True" IsAnimatable="False" IsExpression="True" FormatString="$({0}).css({1},{2});
" RequiresJQueryPlugin="False" JQueryPluginURI="" /></Target.Effects></Target></Animation.Targets></Animation></AnimationCollection>
|
|
jQuery(function($) {
|
|
var timer;
|
|
function mouseoverActiontooltip(event)
|
|
{
|
|
var text = "";
|
|
if (this.id == "type_100")
|
|
{
|
|
text = egg_type_tip_100;
|
|
}
|
|
if (this.id == "type_200")
|
|
{
|
|
text = egg_type_tip_200;
|
|
}
|
|
if (this.id == "type_500")
|
|
{
|
|
text = egg_type_tip_500;
|
|
}
|
|
|
|
$("body").append("<p id='tooltip'>"+ text + "</p>");
|
|
$("#tooltip").css("left",(event.pageX + 20) + "px");
|
|
$("#tooltip").css("top",(event.pageY - 10) + "px");
|
|
}
|
|
|
|
function mouseoutActiontooltip(event)
|
|
{
|
|
$("#tooltip").remove();
|
|
}
|
|
|
|
function mousemoveActiontooltip(event)
|
|
{
|
|
$("#tooltip").css("left",(event.pageX + 20) + "px");
|
|
$("#tooltip").css("top",(event.pageY - 10) + "px");
|
|
}
|
|
|
|
function mouseoverActiontooltipImage(event)
|
|
{
|
|
$("body").append("<p id='tooltip'><img src="+ this.rel + "></img></p>");
|
|
$("#tooltip").css("left",(event.pageX + 20) + "px");
|
|
$("#tooltip").css("top",(event.pageY - 10) + "px");
|
|
}
|
|
|
|
function mouseoutActiontooltipImage(event)
|
|
{
|
|
$("#tooltip").remove();
|
|
}
|
|
|
|
function mousemoveActiontooltipImage(event)
|
|
{
|
|
$("#tooltip").css("left",(event.pageX + 20) + "px");
|
|
$("#tooltip").css("top",(event.pageY - 10) + "px");
|
|
}
|
|
|
|
$('.tooltip').bind('mouseover', mouseoverActiontooltip);
|
|
|
|
$('.tooltip').bind('mouseout', mouseoutActiontooltip);
|
|
|
|
$('.tooltip').bind('mousemove', mousemoveActiontooltip);
|
|
|
|
$('.tooltipImage').bind('mouseover', mouseoverActiontooltipImage);
|
|
|
|
$('.tooltipImage').bind('mouseout', mouseoutActiontooltipImage);
|
|
|
|
$('.tooltipImage').bind('mousemove', mousemoveActiontooltipImage);
|
|
|
|
}); |