Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
jQuery.fn.center = function () {
this.css("position","absolute");
this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px");
return this;
}
function displayhelp(inTitle, inText) {
var objTitle = $(inTitle);
var objText = $(inText);
var objReplace = $("<div id=\"div_helpContent\"><h3>" + inTitle + "</h3><p>" + inText + "</p></div>");
$("#div_helpContent").replaceWith(objReplace)
$("#div_helpWindow").css( "display", "block" );
$("#div_helpWindow").center();
}
//<div id=\"div_helpTitle\"><img src=\"closehelp.png\" class=\"closeHelp\" alt=\"Close\" /></div>
$(document).ready(
function() {
$("body").append(
"<div id=\"div_helpWindow\"><div id=\"div_helpContent\"><h3>Titel</h3><p>Text</p></div><div id=\"div_helpBottom\"><input type=\"button\" value=\"Schließen\" class=\"button closeHelp\" /></div></div>" );
$("#div_helpWindow").css( "display", "none" );
$("#div_helpWindow").center();
$("#div_helpWindow").find(".closeHelp").css( "cursor", "pointer" );
$("#div_helpWindow").find(".closeHelp").click(
function() {
$("#div_helpWindow").css( "display", "none" );
});
});