changeset 67:5b049141a26e trimmed_data

add whitespace removal function to jquery prototype
author Sebastian Kruse <skruse@mpiwg-berlin.mpg.de>
date Wed, 02 Jan 2013 16:52:01 +0100
parents c7df41c5de53
children 8b58d9bc0bb6
files war/Sti.html
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/war/Sti.html	Wed Jan 02 13:19:08 2013 +0100
+++ b/war/Sti.html	Wed Jan 02 16:52:01 2013 +0100
@@ -12,8 +12,16 @@
 
     <title>DARIAH GeoBrowser – e4D Spatio-Temporal Interface</title>
     
+ 	<script src="scripts/jQuery/jquery-1.5.1.js"></script>
+ 	<script>
+		$.fn.cleanWhitespace = function() {
+			textNodes = this.contents().filter(
+			function() { return (this.nodeType == 3 && !/\S/.test(this.nodeValue)); })
+			.remove();
+			return this;
+		};
+ 	</script>	
     <script type="text/javascript" language="javascript" src="sti/sti.nocache.js"></script>    
- 	<script src="scripts/jQuery/jquery-1.5.1.js"></script>
     <script src="scripts/blockUI/FullscreenWindow.js"></script>
 	<script src="scripts/Timeplot/timeplot-complete.js"></script>
     <link type="text/css" rel="stylesheet" href="Sti.css">