Created
March 16, 2015 19:15
-
-
Save alanleard/cf176ff6a21b1053805a to your computer and use it in GitHub Desktop.
Using DOM calls from Appcelerator MobileWeb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doClick(e) { | |
if(OS_MOBILEWEB){ | |
var btn=document.createElement("BUTTON"); | |
btn.style.position='absolute'; | |
var t=document.createTextNode("CLICK ME"); | |
btn.appendChild(t); | |
document.body.appendChild(btn); | |
} | |
} | |
$.index.open(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Alloy> | |
<Window class="container" layout="vertical"> | |
<Button onClick="doClick">add web button</Button> | |
</Window> | |
</Alloy> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment