This repository has been archived by the owner on Feb 6, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'devel'. Version 0.2.0.
- Loading branch information
Showing
15 changed files
with
843 additions
and
3,095 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
Listbox.js | ||
========== | ||
|
||
.. image:: https://travis-ci.org/ikalnitsky/listbox.js.png?branch=master | ||
:target: https://travis-ci.org/ikalnitsky/listbox.js | ||
:Author: `Igor Kalnitsky <[email protected]>`_ | ||
:License: `BSD 3-clause`_ | ||
:Version: 0.2.0 | ||
:Tests: |travis| | ||
|
||
|
||
**Listbox.js** is a simple jQuery plugin that provides a more powerful | ||
|
@@ -28,33 +30,33 @@ Link the component and a stylesheet from your page. | |
.. code:: html | ||
|
||
<!-- make sure that jQuery is already included --> | ||
<script src="js/jquery.min.js"></script> | ||
<script src="/path/to/jquery.js"></script> | ||
|
||
<!-- include listbox plugin and default stylesheet --> | ||
<link href="styles/listbox.css" rel="stylesheet"> | ||
<script src="js/listbox.js"></script> | ||
<link href="/path/to/listbox.css" rel="stylesheet"> | ||
<script src="/path/to/listbox.js"></script> | ||
|
||
|
||
Create Listbox object. | ||
|
||
.. code:: html | ||
|
||
<script> | ||
$(function() { | ||
$('select').listbox({ | ||
'class': 'myOwnClass', | ||
'searchbar': true | ||
}) | ||
}) | ||
</script> | ||
|
||
<select> | ||
<option>Item #1</option> | ||
<option>Item #2</option> | ||
<option>Item #3</option> | ||
<option>Item #4</option> | ||
</select> | ||
|
||
<script> | ||
$(function() { | ||
$('select').listbox({ | ||
'class': 'myOwnClass', | ||
'searchbar': true | ||
}); | ||
}); | ||
</script> | ||
|
||
|
||
Customization | ||
------------- | ||
|
@@ -63,26 +65,13 @@ Listbox.js uses following ``CSS`` classes. | |
|
||
.. code:: css | ||
/* <div>: component container */ | ||
.lbjs {} | ||
/* <div>: container for list items */ | ||
.lbjs-list {} | ||
/* <div>: list item */ | ||
.lbjs-item {} | ||
/* <div>: enabled list item */ | ||
.lbjs-item:not([disabled]) {} | ||
/* <div>: disabled list item */ | ||
.lbjs-item[disabled] {} | ||
/* <div>: selected list item */ | ||
.lbjs-item[selected] {} | ||
/* <input>: search query input */ | ||
.lbjs-searchbar {} | ||
.lbjs {} /* <div>: component container */ | ||
.lbjs-list {} /* <div>: container for list items */ | ||
.lbjs-item {} /* <div>: list item */ | ||
.lbjs-item:not([disabled]) {} /* <div>: enabled list item */ | ||
.lbjs-item[disabled] {} /* <div>: disabled list item */ | ||
.lbjs-item[selected] {} /* <div>: selected list item */ | ||
.lbjs-searchbar {} /* <input>: search query input */ | ||
FAQ | ||
|
@@ -111,13 +100,11 @@ FAQ | |
if (['PHP', 'JavaScript'].indexOf(value) != -1) | ||
$(this).attr('disabled', ''); | ||
}) | ||
}); | ||
Meta | ||
---- | ||
* Author: Igor Kalnitsky <[email protected]> | ||
* Version: 0.2.0-dev | ||
.. _BSD 3-clause: http://raw.github.com/ikalnitsky/listbox.js/master/LICENSE | ||
.. _XSnippet: http://xsnippet.org/ | ||
|
||
.. _XSnippet: http://xsnippet.org/ | ||
.. |travis| image:: https://travis-ci.org/ikalnitsky/listbox.js.png?branch=master |
Oops, something went wrong.