Plugin Directory

Changeset 846201 for hideshowpassword


Ignore:
Timestamp:
01/27/2014 12:12:20 PM (12 years ago)
Author:
barryceelen
Message:

Added check if has touch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • hideshowpassword/trunk/js/public.js

    r846192 r846201  
    22    "use strict";
    33    $(function () {
     4        var hasTouch = false;
     5        if ( ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch ) {
     6            hasTouch = true;
     7        }
    48        $('#user_pass').hideShowPassword({
    59            // Creates a wrapper and toggle element with minimal styles.
    610            innerToggle: true,
    7             touchSupport: true
     11            touchSupport: hasTouch
    812        });
    913    });
Note: See TracChangeset for help on using the changeset viewer.