jHelperTipisintendedtobeusefulinmanysituationssuchashoveringtipandclickabletips.Itcangetdatafromacontainer,throughAjaxoreventheattributesofthecurrentobject.
TheAPIandDefaultValues
$.fn.jHelperTip.defaults={trigger:"click",topOff:3,leftOff:10,source:"container",attrName:'',ttC:"#jHelperTipContainer",/*tooltipContainer*/dC:"#jHelperTipDataContainer",/*dataContainer*/aC:"#jHelperTipAttrContainer",/*attrContainer*/opacity:1.0,loadingImg:"ajax-loader.gif",loadingText:"Loading...",type:"GET",/*datacanbeinlineorCSSselector*///url:'',//data:'',autoClose:true};
ExplanationoftheOptions:
trigger:"click"or"hover"totriggerthetooltip
topOff:topoffsetfrommousepointer
leftOff:leftoffsetfrommousepointer
source:canbe"container","ajax"or"attribute",containerisancontainerincurrentpage,ajaxloadsfromanotherpage,attributewillreadtheattributeofcurrentobject.
attrName:theattributethatyouwanttopassthedatafrom(onlyworksifyoursourceisattribute)
ttC:tooltipcontainer(defineacontainertopositionyourtooltipandreceivedatafromajax),willcreateifcontainernotfounduse"#container"andnot"container"
dC:datacontainerforsamepagecontainer(onlyworksifyoursourceiscontainer)
aC:attributedatacontainer(onlyworksifyoursourceisattribute)
opacity:opacityofthetooltips
loadingImg:theloadingimageindicatorinAjaxcalls(onlyworksifyoursourceisajax)
loadingText:theloadingtextindicatorinAjaxcalls(onlyworksifyoursourceisajax)
type:"GET"or"POST"(onlyworksifyoursourceisajax)
url:Theaddressofthepagethatyouarefetchingfrom(onlyworksifyoursourceisajax)
data:datapassedtotheajaxrequest(onlyworksifyoursourceisajax)
autoClose:trueorfalse,specifyifexplicitactionisneededtoclosethetooltipExamples
jQuery.noConflict();
jQuery(function($){$("#test").jHelperTip({trigger:"click",dC:"#tip1",autoClose:false,opacity:0.9});
Mattisdoingsomethingdangerous
clickheretoclose
adj.
1.Involvingorfilledwithdanger;perilous.
2.Beingableorlikelytodoharm.
评论