From ff9f537503912e41605048e604fb938256468001 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 8 Jul 2011 13:12:06 +0200 Subject: deprecated prependChild() --- lib/scripts/compatibility.js | 6 ++++++ lib/scripts/script.js | 13 ------------- 2 files changed, 6 insertions(+), 13 deletions(-) (limited to 'lib/scripts') 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 @@ -146,19 +146,6 @@ function escapeQuotes(text) { return 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 * -- cgit v1.2.3