Skip to content

Commit

Permalink
revised README
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketMan committed Mar 30, 2024
1 parent a0a5128 commit 3c154cf
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# jquery-fxtime
Firefox-like time element plugin for jQuery
Firefox-like time plugin for jQuery

### INSTALLATION

Expand All @@ -8,7 +8,7 @@ addition, include jQuery, if it has not already been included. For
example,

```html
<!-- include jQuery, if you webpage has not already included it -->
<!-- include jQuery, if your webpage has not already included it -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<!-- include the minified jquery-fxtime.js -->
<script src="https://cdn.jsdelivr.net/gh/RocketMan/jquery-fxtime/dist/jquery-fxtime.min.js"></script>
Expand Down Expand Up @@ -40,27 +40,26 @@ The following optional attributes are recognized on the INPUT element:
* `required`

If 'min' and/or 'max' are specified, validation will be performed
against the time value, and the pseudo-classes :valid and :invalid
against the time value, and the pseudo-classes `:valid` and `:invalid`
will be set on the element as appropriate.

If 'required' is specified, :valid will be set if and only if a valid
If 'required' is specified, `:valid` will be set if and only if a valid
time value has been entered.


The following methods are available:

* `$(selector).fxtime('val')` - get 24-hour time value
* `$(selector).fxtime('val')` - get 24-hour time value;
returns null if time is not set
* `$(selector).fxtime('val', value)` - set 24-hour time value
* `$(selector).fxtime('val', value)` - set 24-hour time value;
value format is hh:mm[:ss], where 0 <= hh <= 23, or null
* `$(selector).fxtime('seg', seg)` - get specified segment value
* `$(selector).fxtime('seg', seg)` - get specified segment value;
seg: 0 = hours, 1 = minutes, 2 = seconds, 3 = AM/PM
* `$(selector).fxtime('seg', seg, value)` - set specified segment
* `$(selector).fxtime('seg', seg, null)` - clear specified segment
* `$(selector).fxtime('inc', seg)` - increment specified segment
* `$(selector).fxtime('inc', seg, -1)` - decrement specified segment


The element fires the following custom events:

* `segblur` - fires when a segment blurs
Expand Down

0 comments on commit 3c154cf

Please sign in to comment.