summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2011-07-08 13:12:06 +0200
committerAndreas Gohr <andi@splitbrain.org>2011-07-08 13:12:06 +0200
commitff9f537503912e41605048e604fb938256468001 (patch)
tree0474ec76b8a8720b90a85945a23c1a26ae832bd9
parent32cb905a0339607a7acfef6488bec0015bae6b8b (diff)
downloadrpg-ff9f537503912e41605048e604fb938256468001.tar.gz
rpg-ff9f537503912e41605048e604fb938256468001.tar.bz2
deprecated prependChild()
-rw-r--r--lib/scripts/compatibility.js6
-rw-r--r--lib/scripts/script.js13
2 files changed, 6 insertions, 13 deletions
diff --git a/lib/scripts/compatibility.js b/lib/scripts/compatibility.js
index 1ab7d02ad..e9d845625 100644
--- a/lib/scripts/compatibility.js
+++ b/lib/scripts/compatibility.js
@@ -49,3 +49,9 @@ function getElementsByClass(searchClass,node,tag){
if(node == null) node = document;
return jQuery(node).find(tag+'.'+searchClass).toArray();
}
+
+function prependChild(parent,element) {
+ DEPRECATED('Use jQuery.prepend() instead');
+ jQuery(parent).prepend(element);
+}
+
diff --git a/lib/scripts/script.js b/lib/scripts/script.js
index e3216177c..b44d95d6f 100644
--- a/lib/scripts/script.js
+++ b/lib/scripts/script.js
@@ -147,19 +147,6 @@ function escapeQuotes(text) {
}
/**
- * Adds a node as the first childenode to the given parent
- *
- * @see appendChild()
- */
-function prependChild(parent,element) {
- if(!parent.firstChild){
- parent.appendChild(element);
- }else{
- parent.insertBefore(element,parent.firstChild);
- }
-}
-
-/**
* Prints a animated gif to show the search is performed
*
* Because we need to modify the DOM here before the document is loaded