Skip to content

Commit d4aae99

Browse files
committed
Update README
1 parent 7f25ab9 commit d4aae99

File tree

2 files changed

+89
-78
lines changed

2 files changed

+89
-78
lines changed

README.md

Lines changed: 88 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -229,87 +229,98 @@ $(function(){
229229
##Options:
230230

231231
<table>
232-
<tr>
233-
<td><strong>Option</strong></td>
234-
<td><strong>Default</strong></td>
235-
<td><strong>Type</strong></td>
236-
<td><strong>Description</strong></td>
237-
</tr>
238-
<tr>
239-
<td>onOpen</td>
240-
<td>function() {}</td>
241-
<td>Function</td>
242-
<td>Function called when select options is opened</td>
243-
</tr>
244-
<tr>
245-
<td>onChange</td>
246-
<td>function() {}</td>
247-
<td>Function</td>
248-
<td>Function called when select options is changed</td>
249-
</tr>
250-
<tr>
251-
<td>onClose</td>
252-
<td>function() {}</td>
253-
<td>Function</td>
254-
<td>Function called when select options is closed</td>
255-
</tr>
256-
<tr>
257-
<td>maxHeight</td>
258-
<td>300</td>
259-
<td>Integer</td>
260-
<td>Maximum height options box can be</td>
261-
</tr>
262-
<tr>
263-
<td>keySearchTimeout</td>
264-
<td>500</td>
265-
<td>Integer</td>
266-
<td>After this time without pressing any key, the search string is reseted</td>
267-
</tr>
268-
<tr>
269-
<td>arrowButtonMarkup</td>
270-
<td>&lt;b class=&quot;button&quot;&gt;&amp;#9662;&lt;/b&gt;</td>
271-
<td>String [HTML]</td>
272-
<td>Markup for open options button</td>
273-
</tr>
274-
<tr>
275-
<td>disableOnMobile</td>
276-
<td>true</td>
277-
<td>Boolean</td>
278-
<td>Initialize plugin on mobile browsers</td>
279-
</tr>
280-
<tr>
281-
<td>border</td>
282-
<td>1</td>
283-
<td>Integer</td>
284-
<td>Options box border thickness</td>
285-
</tr>
286-
<tr>
287-
<td>openOnHover</td>
288-
<td>false</td>
289-
<td>Boolean</td>
290-
<td>Open select box on hover, instead of click</td>
291-
</tr>
292-
<tr>
293-
<td>expandToItemText</td>
294-
<td>false</td>
295-
<td>Boolean</td>
296-
<td>Expand options box past wrapper</td>
297-
</tr>
298-
<tr>
299-
<td>responsive</td>
300-
<td>false</td>
301-
<td>Boolean</td>
302-
<td>The select element become responsive</td>
303-
</tr>
232+
<tr>
233+
<td><strong>Option</strong></td>
234+
<td><strong>Default</strong></td>
235+
<td><strong>Type</strong></td>
236+
<td><strong>Description</strong></td>
237+
</tr>
238+
<tr>
239+
<td>onOpen</td>
240+
<td>function() {}</td>
241+
<td>Function</td>
242+
<td>Function called when select options open</td>
243+
</tr>
244+
<tr>
245+
<td>onChange</td>
246+
<td>function() {}</td>
247+
<td>Function</td>
248+
<td>Function called when select options change</td>
249+
</tr>
250+
<tr>
251+
<td>onClose</td>
252+
<td>function() {}</td>
253+
<td>Function</td>
254+
<td>Function called when select options close</td>
255+
</tr>
256+
<tr>
257+
<td>maxHeight</td>
258+
<td>300</td>
259+
<td>Integer</td>
260+
<td>Maximum height options box can be</td>
261+
</tr>
262+
<tr>
263+
<td>keySearchTimeout</td>
264+
<td>500</td>
265+
<td>Integer</td>
266+
<td>After this time without pressing any key, the search string is reset</td>
267+
</tr>
268+
<tr>
269+
<td>arrowButtonMarkup</td>
270+
<td>&lt;b class=&quot;button&quot;&gt;&amp;#9662;&lt;/b&gt;</td>
271+
<td>String [HTML]</td>
272+
<td>Markup for open options button</td>
273+
</tr>
274+
<tr>
275+
<td>disableOnMobile</td>
276+
<td>true</td>
277+
<td>Boolean</td>
278+
<td>Initialize plugin on mobile browsers</td>
279+
</tr>
280+
<tr>
281+
<td>border</td>
282+
<td>1</td>
283+
<td>Integer</td>
284+
<td>Options box border thickness</td>
285+
</tr>
286+
<tr>
287+
<td>openOnHover</td>
288+
<td>false</td>
289+
<td>Boolean</td>
290+
<td>Open select box on hover, instead of click</td>
291+
</tr>
292+
<tr>
293+
<td>expandToItemText</td>
294+
<td>false</td>
295+
<td>Boolean</td>
296+
<td>Expand options box past wrapper</td>
297+
</tr>
298+
<tr>
299+
<td>responsive</td>
300+
<td>false</td>
301+
<td>Boolean</td>
302+
<td>The select element become responsive</td>
303+
</tr>
304304
<tr>
305305
<td>customClass</td>
306-
<td>{ <br>
307-
prefix: 'selectric', <br>
308-
postfixes: 'Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive', <br>
309-
camelCase: true <br>
306+
<td>{
307+
prefix: 'selectric',
308+
postfixes: 'Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive',
309+
camelCase: true
310310
}</td>
311311
<td>Object</td>
312-
<td>Custom classes</td>
312+
<td>Custom classes.
313+
Every class in 'postfixes' should be separate with a space and follow this exact order: 'Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive'</td>
314+
</tr>
315+
<tr>
316+
<td>optionsItemBuilder</td>
317+
<td>'{text}'</td>
318+
<td>String or Function</td>
319+
<td>Define how each option should be rendered inside its &lt;li&gt; element.
320+
321+
If it's a string, all keys wrapped in brackets will be replaced by the respective values in itemData. Available keys are: 'value', 'text', 'slug', 'disabled'.
322+
323+
If it's a function, it will be called with the following parameters: (itemData, element, index). The function must return a string, no keys will be replaced in this method.</td>
313324
</tr>
314325
</table>
315326

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ <h2>Options</h2>
401401
</tr>
402402
<tr>
403403
<td>optionsItemBuilder</td>
404-
<td><pre><code>{text}</code></pre></td>
404+
<td><pre><code>'{text}'</code></pre></td>
405405
<td>String or Function</td>
406406
<td>Define how each option should be rendered inside its &lt;li&gt; element. <br><br>
407407
If it's a string, all keys wrapped in brackets will be replaced by the respective values in itemData. Available keys are: 'value', 'text', 'slug', 'disabled'. <br><br>

0 commit comments

Comments
 (0)