Created
September 4, 2014 17:59
-
-
Save grantges/798ee95a756721f820d3 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