mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-12 23:09:15 +01:00
53 lines
1.8 KiB
HTML
53 lines
1.8 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<title>jQuery MultiSelect Widget Demo</title>
|
||
|
<link rel="stylesheet" type="text/css" href="../jquery.multiselect.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="assets/style.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="assets/prettify.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" />
|
||
|
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
|
||
|
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
|
||
|
<script type="text/javascript" src="../src/jquery.multiselect.js"></script>
|
||
|
<script type="text/javascript" src="assets/prettify.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(function(){
|
||
|
|
||
|
var $widget = $("select").multiselect(), state = true;
|
||
|
$("#toggle-disabled").click(function(){
|
||
|
state = !state;
|
||
|
$widget.multiselect(state ? 'disable' : 'enable');
|
||
|
});
|
||
|
|
||
|
});
|
||
|
</script>
|
||
|
</head>
|
||
|
<body onload="prettyPrint();">
|
||
|
|
||
|
<h2>Enable/Disable Widget</h2>
|
||
|
<p>Programmatically calling the disable and enable methods.</p>
|
||
|
<pre class="prettyprint">
|
||
|
var $widget = $("select").multiselect(),
|
||
|
state = true;
|
||
|
|
||
|
$("#toggle-disabled").click(function(){
|
||
|
state = !state;
|
||
|
$widget.multiselect(state ? 'disable' : 'enable');
|
||
|
});
|
||
|
</pre>
|
||
|
|
||
|
|
||
|
<select name="example-disabled" disabled="disabled" multiple="multiple" size="5">
|
||
|
<option value="option1">Option 1</option>
|
||
|
<option value="option2">Option 2</option>
|
||
|
<option value="option3">Option 3</option>
|
||
|
<option value="option4">Option 4</option>
|
||
|
<option value="option5">Option 5</option>
|
||
|
</select>
|
||
|
|
||
|
<p style="margin-top:5px"><button type="button" name="toggle" id="toggle-disabled">Toggle Disabled</button></p>
|
||
|
|
||
|
</body>
|
||
|
</html>
|