Introduction
Here's a sample for how to start using YUI framework.
First, linking for the API
Code:
<script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js"
charset="utf-8"></script>
Code:
<input type="text" id="ac-input"/>
Code:
<script>
YUI.use('autocomplete', function(Y){
Y.one('#ac-input').plug(Y.Plugin.AutoComplete, {
source: ['apple','amazon','air','america']
});
});
</script>
YUI.use('autocomplete', function(Y){
Y.one('#ac-input').plug(Y.Plugin.AutoComplete, {
source: ['apple','amazon','air','america']
});
});
</script>
No comments:
Post a Comment