Skip to content

Instantly share code, notes, and snippets.

@nathan5x-zz
Created April 12, 2018 06:44
Show Gist options
  • Save nathan5x-zz/9e054f5dcb212118d7c6d5cca643195e to your computer and use it in GitHub Desktop.
Save nathan5x-zz/9e054f5dcb212118d7c6d5cca643195e to your computer and use it in GitHub Desktop.
Create UI Component in HTML, CSS, and JS like it is in Adobe Flex & ActionScript
function function LoginControl() {
this.loginData = { username:'', password:'' };
this.name = '';
this.loginUI = $('<div class="login-ui"> \
<form name="loginForm" class="login-form"> \
<div class="form-fields"> \
<label class="title"> User Login </label> \
<div class="form-field"> \
<input type="text" class="input-text username" name="username" placeholder="User ID"/> \
</div> \
<div class="form-field"> \
<input type="password" class="input-text" name="password" placeholder="Password"/> \
</div> \
<input class="btn submit" type="submit" value="Login to your account"/> \
</div> \
</form> \
</div>');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment