Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store
.sass-cache
node_modules
package-lock.json
node_modules
.idea
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,45 @@ $(document).ready(function() {
});
```

## Usage with Vue.js

Require plugin in `bootstrap.js` or other root js script:

```js
// ... code
try {
window.$ = window.jQuery = require('jquery');

require('jquery-nice-select');
// .. load other plugin
require('bootstrap-sass');
} catch (e) {}
```

Then finally in your component you must define new directive:

```vue
<template>
<select v-nice-select>
<option>Option 1</option>
<option>Option 2</option>
<option>Option N</option>
</select>
</template>

<script>
export default {
directives: {
niceSelect: {
componentUpdated(el) {
$(el).niceSelect();
}
}
}
}
</script>
```

---

Full documentation and examples at [hernansartorio.com/jquery-nice-select](http://hernansartorio.com/jquery-nice-select).
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-nice-select",
"version": "1.1.0",
"version": "1.2.0",
"authors": [
"Hernán Sartorio <[email protected]>"
],
Expand Down
4 changes: 0 additions & 4 deletions css/nice-select.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
padding-right: 30px;
position: relative;
text-align: left !important;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
-webkit-user-select: none;
-moz-user-select: none;
Expand Down Expand Up @@ -47,7 +46,6 @@
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transition: all 0.15s ease-in-out;
transition: all 0.15s ease-in-out;
width: 5px; }
.nice-select.open:after {
Expand Down Expand Up @@ -105,7 +103,6 @@
-webkit-transform: scale(0.75) translateY(-21px);
-ms-transform: scale(0.75) translateY(-21px);
transform: scale(0.75) translateY(-21px);
-webkit-transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out;
transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out;
z-index: 9; }
.nice-select .list:hover .option:not(:hover) {
Expand All @@ -120,7 +117,6 @@
padding-left: 18px;
padding-right: 29px;
text-align: left;
-webkit-transition: all 0.2s;
transition: all 0.2s; }
.nice-select .option:hover, .nice-select .option.focus, .nice-select .option.selected.focus {
background-color: #f6f6f6; }
Expand Down
6 changes: 0 additions & 6 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
padding-right: 30px;
position: relative;
text-align: left !important;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
-webkit-user-select: none;
-moz-user-select: none;
Expand Down Expand Up @@ -47,7 +46,6 @@
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transition: all 0.15s ease-in-out;
transition: all 0.15s ease-in-out;
width: 5px; }
.nice-select.open:after {
Expand Down Expand Up @@ -105,7 +103,6 @@
-webkit-transform: scale(0.75) translateY(-21px);
-ms-transform: scale(0.75) translateY(-21px);
transform: scale(0.75) translateY(-21px);
-webkit-transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out;
transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out;
z-index: 9; }
.nice-select .list:hover .option:not(:hover) {
Expand All @@ -120,7 +117,6 @@
padding-left: 18px;
padding-right: 29px;
text-align: left;
-webkit-transition: all 0.2s;
transition: all 0.2s; }
.nice-select .option:hover, .nice-select .option.focus, .nice-select .option.selected.focus {
background-color: #f6f7f9; }
Expand Down Expand Up @@ -273,7 +269,6 @@ a:not(.button) {
color: #55a1fb;
outline: none;
text-decoration: none;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
border-bottom: 1px solid transparent; }
a:not(.button):hover, a:not(.button):focus {
Expand Down Expand Up @@ -325,7 +320,6 @@ label {
padding: 0 24px;
text-align: center;
text-decoration: none;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
white-space: nowrap;
width: auto; }
Expand Down
Loading