GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Sunday, May 15, 2011

YUI - Starting

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>
Second, make your control

Code:

<input type="text" id="ac-input"/>
Third, write the code

Code:

<script>
YUI.use('autocomplete', function(Y){
        Y.one('#ac-input').plug(Y.Plugin.AutoComplete, {
            source: ['apple','amazon','air','america']
    });
});
</script>


Share/Bookmark

No comments:

Post a Comment