Created
December 1, 2016 13:12
-
-
Save omarkdev/4b4dc88ed0a9bd8630704754082c1b89 to your computer and use it in GitHub Desktop.
Input not clickable with css and jQuery
This file contains hidden or 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
.inpt-no-clickable { | |
pointer-events: none; | |
} |
This file contains hidden or 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
$(document).on('focus', '.inpt-no-clickable', function(event) { | |
var $input = $(this); | |
$input.blur(); | |
event.preventDefault(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment