Permalink
Browse files

fmlasmfldsfs

  • Loading branch information...
mgoffan committed May 13, 2012
1 parent 1bd5cb5 commit e6c1e997b4f5830128f97eaf8eff23c085a2d8ca
Showing with 24 additions and 21 deletions.
  1. +24 −21 www/homepage.html
View
@@ -48,25 +48,7 @@
/* function triggerCount() { */
/* clearTimeout(); */
- window.setInterval(function(){
-/* alert('a'); */
- console.log('a');
- /// call your function here
- $.ajax({
- type: 'POST',
- url: 'http://192.168.0.150/api/updates',
- data: {q: '{"lat":'+pGG.coords.latitude+',"lon":'+pGG.coords.longitude+'}'},
- success: function(data) {
- console.log(data);
- var obj = $.parseJSON(data);
-
- var html = '<div class="well comment" style="font-size:15px;"><ul class="thumbnails"><li class="span3" style="width:48px;height:48px"><a href="#" class="thumbnail"><img src="http://placehold.it/48x48" /></a></li><span style="position:relative;top:15px;">&nbsp; Roberto: <strong>que tal muchachas</strong></span></ul></div>';
- console.writeln(html);
- $('#separador').prepend(html);
-
- }
- });
- }, 5000);
+
/* } */
</script>
@@ -76,13 +58,34 @@
<img src="img/banner.png" width="360" height="118"></div><br>
<script>
-function addComment()
+function addComment(html)
{
var el = $('.comment').html();
console.log(el);
- var er = $('#separador').prepend('<div class="well comment" style="font-size:15px;">'+el+'</div>');
+ $('#separador').prepend('<div class="well comment" style="font-size:15px;">'+el+'</div>');
}
+window.setInterval(function(){
+ console.log('a');
+ /// call your function here
+ $.ajax({
+ type: 'POST',
+ url: 'http://192.168.0.150/api/updates',
+ data: {q: '{"lat":'+pGG.coords.latitude+',"lon":'+pGG.coords.longitude+'}'},
+ success: function(data) {
+ console.log(data);
+ var obj = $.parseJSON(data);
+
+ var el = $('.comment').html();
+ var html = '<div class="well comment" style="font-size:15px;"><ul class="thumbnails"><li class="span3" style="width:48px;height:48px"><a href="#" class="thumbnail"><img src="http://placehold.it/48x48" /></a></li><span style="position:relative;top:15px;">&nbsp; Roberto: <strong>que tal muchachas</strong></span></ul></div>';
+ addComment('<div class="well comment" style="font-size:15px;">'+el+'</div>');
+ console.writeln(html);
+ $('#separador').prepend(html);
+
+ }
+ });
+}, 5000);
+
</script>
<div class="tabbable">

0 comments on commit e6c1e99

Please sign in to comment.