Created
December 18, 2012 21:07
-
-
Save brianpeiris/4332019 to your computer and use it in GitHub Desktop.
Sample code for Adobe Air problem
This file contains hidden or 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
<application xmlns="http://ns.adobe.com/air/application/2.7"> | |
<id>examples.html.HelloAir</id> | |
<versionNumber>0.1</versionNumber> | |
<filename>HelloAir</filename> | |
<initialWindow> | |
<content>HelloAir.html</content> | |
<visible>true</visible> | |
<width>400</width> | |
<height>200</height> | |
</initialWindow> | |
</application> |
This file contains hidden or 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
<html> | |
<head> | |
<title>Hello Air</title> | |
<script type="text/javascript" src="jquery.js"></script> | |
<script type="text/javascript"> | |
function appLoad(){ | |
$(".partOptions").on("DOMNodeInserted", "option", function() { | |
alert('detected inserted option'); | |
}); | |
var i = 0; | |
$('button').click(function () { | |
alert('inserting option'); | |
i++; | |
$('select').append('<option value="' + i + '">foo' + i + '</option>'); | |
}); | |
} | |
</script> | |
</head> | |
<body onLoad="appLoad()"> | |
<h1>Hello Air</h1> | |
<button>add option</button> | |
<div class="partOptions"> | |
<select> | |
<option value="0">foo0</option> | |
</select> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment