Skip to content

Instantly share code, notes, and snippets.

@Alevale
Created November 3, 2014 22:19
Show Gist options
  • Save Alevale/452168ef0cdfbd4ee84f to your computer and use it in GitHub Desktop.
Save Alevale/452168ef0cdfbd4ee84f to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../paper-input/paper-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
}
#paper_input {
left: 360px;
top: 170px;
position: absolute;
}
#hi{
left: 360px;
top: 170px;
position: absolute;
height: 20px;
width: 20px;
}
</style>
<paper-input label="Type something..." willvalidate id="paper_input" on-blur="{{ handlemail }}" layout vertical></paper-input>
<div id="hi"></div>
</template>
<script>
Polymer({
handlemail: function (){
document.getElementById('paper_input').style.backgroundColor = "lightred";
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment