New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More β†’
Socket
Sign inDemoInstall
Socket

jquery.phile

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jquery.phile

Make file inputs styleable and more frendly for css

1.0.2
latest
Source
npm
Version published
Maintainers
1
Created
Source

jQuery.Phile Demo

Make file inputs styleable and more friendly for css

Usage

  • Include jQuery:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
  • Include plugin's code:
<script src='dist/jquery.phile.min.js'></script>
  • Call the plugin:
$("input[type='file']").phile();
  • Add some css:
.phile {
  ...
}

.phile .text {
  ...
}

.phile .button {
  ...
}

Structure

The basic structure of the project is given in the following way:

β”œβ”€β”€ demo/
β”‚   └── index.html
β”œβ”€β”€ dist/
β”‚   β”œβ”€β”€ jquery.phile.js
β”‚   └── jquery.phile.min.js
β”œβ”€β”€ src/
β”‚   └── jquery.phile.js
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .jshintrc
β”œβ”€β”€ Gulpfile.js
β”œβ”€β”€ README.md
└── package.json

Options

wrapClass [default: "phile"]

Root wrapper class name. $("input").phile({ wrapClass: "customWrapClass" })

textClass [default: "text"]

Class name for fallback input text element. $("input").phile({ textClass: "customTextClass" })

buttonClass [default: "button"]

Class name for button. $("input").phile({ buttonClass: "customButtonClass" })

buttonText [default: "Browse"]

Custom text for button. $("input").phile({ buttonText: "chooseFile" })

placeholder [default: ""]

Custom placeholder for input text fallback: $("input").phile({ placeholder: "Choose file..." })

Also, you can specify the [placeholder] attribute for input[file] it will be used as default values automatically. <input type="file" placeholder="Choose file...">

reversed [default: false]

Swap order of text and button. $("input").phile({ reversed: true })

History

Check Releases for detailed changelog.

License

MIT License Β© Zeno Rocha

Keywords

jquery-plugin

FAQs

Package last updated on 30 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts