Hi guys,
I've problem with addSwipeLeftListener and addSwipeRightListener. It only work on emulator and failed on Nokia Browser.
Here's how I implement it:
On xhr.onreadystatechange, I add the following code:
Code:if( index != (len-1)) { swipe += "mwl.addSwipeLeftListener('#detail_" + i + "', 'mwl.addClass(\"#detail_" + i + "\", \"hide\");"; swipe += "mwl.removeClass(\"#detail_" + (i + 1) + "\", \"hide\")');"; } if( index != 0) { swipe += "mwl.addSwipeRightListener('#detail_" + i + "', 'mwl.addClass(\"#detail_" + i + "\", \"hide\");"; swipe += "mwl.removeClass(\"#detail_" + (i - 1) + "\", \"hide\")');"; }
and this code, to attach script to body:
This code works fine on emulator but failed on Nokia Browser. Any help is greatly appreciated.Code:var scriptNode = document.createElement('SCRIPT'); var scriptText = document.createTextNode(swipe); scriptNode.appendChild(scriptText); var bodyNode = document.getElementsByTagName('body')[0]; bodyNode.appendChild(scriptNode);

Reply With Quote

