From d7ae7e6f8f554f8f64aeaa7911604103db478357 Mon Sep 17 00:00:00 2001 From: Alib Date: Wed, 17 Mar 2010 16:50:28 +0100 Subject: reinit activesession when goign back to home --- js/istreamdev.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/istreamdev.js b/js/istreamdev.js index f163f49..5319adf 100644 --- a/js/istreamdev.js +++ b/js/istreamdev.js @@ -68,8 +68,6 @@ $.getJSON("bin/backend.php", //Goto home $('#home_but').tap(function(event) { event.preventDefault(); - getRunningSessions(); - reinitDivs(); jQT.goTo('#home','flip'); }); @@ -149,6 +147,15 @@ $(document).ready(function(e){ getRunningSessions(); }); +//reinit RunningSessions when going to Home: +$(document).ready(function(e){ +$('#home').bind('pageAnimationStart', function(event, info){ + if (info.direction == 'in') { + getRunningSessions() + } + }) +}); + function getRunningSessions() { var dataString = "action=getRunningSessions"; $('#home #runningsessions').html(''); -- cgit v1.2.3