-
-
Notifications
You must be signed in to change notification settings - Fork 651
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
386 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<script> | ||
init({ | ||
title: 'The Locale', | ||
desc: 'Use <code>locale: true</code> to set the locale.', | ||
links: ['multiple-select.css'], | ||
scripts: [ | ||
'multiple-select.js', | ||
'https://unpkg.com/[email protected]/dist/multiple-select-locale-all.min.js' | ||
] | ||
}) | ||
</script> | ||
|
||
<style> | ||
select { | ||
width: 500px; | ||
} | ||
.mb20 { | ||
margin-bottom: 20px; | ||
} | ||
</style> | ||
|
||
<div class="mb20"> | ||
<select id="locale"> | ||
<option value="en-US">English</option> | ||
<option value="zh-CN">简体中文</option> | ||
<option value="zh-TW">繁體中文</option> | ||
</select> | ||
</div> | ||
|
||
<div> | ||
<select id="select" multiple="multiple"> | ||
<option value="1">January</option> | ||
<option value="2">February</option> | ||
<option value="3">March</option> | ||
<option value="4">April</option> | ||
<option value="5">May</option> | ||
<option value="6">June</option> | ||
<option value="7">July</option> | ||
<option value="8">August</option> | ||
<option value="9">September</option> | ||
<option value="10">October</option> | ||
<option value="11">November</option> | ||
<option value="12">December</option> | ||
</select> | ||
</div> | ||
|
||
<script> | ||
function updateLocale(locale) { | ||
$('#select').multipleSelect('destroy').multipleSelect({ | ||
locale: locale | ||
}) | ||
} | ||
|
||
function mounted() { | ||
$('#locale').multipleSelect({ | ||
single: true | ||
}).change(function () { | ||
updateLocale($(this).val()) | ||
}).change() | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.