Skip to content

Make inputs stylable: checkbox, radiobutton, input file, select

Notifications You must be signed in to change notification settings

piwko28/styledInput

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

STYLED INPUT

Make inputs stylable: checkbox, radiobutton, filepicker, select

Use script on inputs:

$("select").styledInput({ // all select inputs on the webpage
  wrapperClass : 'myselect', // additional class
  wrapperId : 'myid', // additional id; for more elements - autoincremental
  before : true, // adds "before" container
  after : true // adds "after" container
});

We will get:

<div class="styledInput myselect" id="myid">
  <select>
    <option>Value 1</option>
    <option>Value 2</option>
    <option>Value 3</option>
  </select>
  <span>Value 1</span>
</div>

Angular directive

Add styledinput.js and angular.styledinput.js to head section.

Add a module to your angular application, ex.:

angular.module('yourApp', ['styledInput']);

Now you can use styled input in your angular applications by adding styled-input attribute:

<input type="checkbox" styled-input>

As a value you can put wrapper class:

<select styled-input="select">

Other properties:

<input type="radio"
  name="hobby"
  styled-input="radio"
  styled-input-id="hobby"
  styled-input-before
  styled-input after>

About

Make inputs stylable: checkbox, radiobutton, input file, select

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published