Skip to content

Commit c756b96

Browse files
committed
docs: update documentation
1 parent 8ee13da commit c756b96

File tree

1 file changed

+45
-55
lines changed

1 file changed

+45
-55
lines changed

docs/assets/js/application.js

Lines changed: 45 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -122,62 +122,52 @@
122122
})
123123

124124
var myMultiSelect = document.getElementById('multiSelect')
125-
// eslint-disable-next-line no-unused-vars
126-
var cuiMultiSelect = new coreui.MultiSelect(myMultiSelect, {
127-
name: 'multiSelect',
128-
options: [
129-
{
130-
value: 0,
131-
text: 'Angular'
132-
},
133-
{
134-
value: 1,
135-
text: 'Bootstrap',
136-
selected: true
137-
},
138-
{
139-
value: 2,
140-
text: 'React.js',
141-
selected: true
142-
},
143-
{
144-
value: 3,
145-
text: 'Vue.js'
146-
},
147-
{
148-
label: 'backend',
149-
options: [
150-
{
151-
value: 4,
152-
text: 'Django'
153-
},
154-
{
155-
value: 5,
156-
text: 'Laravel'
157-
},
158-
{
159-
value: 6,
160-
text: 'Node.js',
161-
selected: true
162-
}
163-
]
164-
}
165-
],
166-
search: true
167-
})
168-
169-
console.log(myMultiSelect)
170-
171-
// var myMultiSelect2 = document.getElementById('multiSelect')
172-
myMultiSelect.addEventListener('changed.coreui.multi-select', function (event) {
173-
console.log(event.value)
174-
})
175-
// console.log(myMultiSelect2)
176125

177-
var ms1 = document.getElementById('ms1')
178-
ms1.addEventListener('changed.coreui.multi-select', function (event) {
179-
console.log(event.value)
180-
})
126+
if (myMultiSelect) {
127+
// eslint-disable-next-line no-unused-vars
128+
var cuiMultiSelect = new coreui.MultiSelect(myMultiSelect, {
129+
name: 'multiSelect',
130+
options: [
131+
{
132+
value: 0,
133+
text: 'Angular'
134+
},
135+
{
136+
value: 1,
137+
text: 'Bootstrap',
138+
selected: true
139+
},
140+
{
141+
value: 2,
142+
text: 'React.js',
143+
selected: true
144+
},
145+
{
146+
value: 3,
147+
text: 'Vue.js'
148+
},
149+
{
150+
label: 'backend',
151+
options: [
152+
{
153+
value: 4,
154+
text: 'Django'
155+
},
156+
{
157+
value: 5,
158+
text: 'Laravel'
159+
},
160+
{
161+
value: 6,
162+
text: 'Node.js',
163+
selected: true
164+
}
165+
]
166+
}
167+
],
168+
search: true
169+
})
170+
}
181171

182172
// Insert copy to clipboard button before .highlight
183173
var btnHtml = '<div class="docs-clipboard"><button type="button" class="btn-clipboard btn btn-ghost-primary" title="Copy to clipboard"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><polygon fill="var(--ci-primary-color, currentColor)" points="408 432 376 432 376 464 112 464 112 136 144 136 144 104 80 104 80 496 408 496 408 432" class="ci-primary"/><path fill="var(--ci-primary-color, currentColor)" d="M176,16V400H496V153.373L358.627,16ZM464,368H208V48H312V200H464Zm0-200H344V48h1.372L464,166.627Z" class="ci-primary"/></svg></button></div>'

0 commit comments

Comments
 (0)