Commit f3689604 authored by Jörn Zaefferer's avatar Jörn Zaefferer

API docs: Hacked multiple argument types like "Element|jQuery|String"...

API docs: Hacked multiple argument types like "Element|jQuery|String" representation into multiple elements, each with theier own tooltip
parent 6350e8a7
...@@ -13,10 +13,19 @@ var types = { ...@@ -13,10 +13,19 @@ var types = {
}; };
$(document).ready(function(){ $(document).ready(function(){
$("span.tooltip").each(function(){ var tooltips = $("span.tooltip").each(function() {
if ( types[ this.innerHTML ] ) var type = this.innerHTML;
if( type.indexOf("|") != -1 ) {
var $this = $(this).empty();
$.each(type.split("\|"), function(i, n) {
var title = types[n] && " title=\"" + types[n] + "\"" || "";
var pipe = i != 0 ? "|" : "";
$this.append( pipe + "<span class=\"tooltip\" " + title + ">" + n + "</span>" );
});
} else if ( types[ this.innerHTML ] )
this.title = types[ this.innerHTML ]; this.title = types[ this.innerHTML ];
}).ToolTipDemo('#fff'); })
tooltips.add($("span.tooltip", tooltips)).ToolTipDemo('#fff');
$("a.name").click(function(){ $("a.name").click(function(){
$("div.more,div.short",this.parentNode.parentNode).toggle(); $("div.more,div.short",this.parentNode.parentNode).toggle();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment