Created
June 26, 2013 10:59
-
-
Save anonymous/5866575 to your computer and use it in GitHub Desktop.
hide/toggle element jquery bootstrap snippet
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
<!-- html --> | |
<a class="btn btn-mini hider-toggle" style="padding:0px 4px;"> | |
<i class="icon-eye-open"></i> | |
</a> | |
<span class="hider">{$number->decrypted_password}</span> | |
<span class="hider-fake">*******</span> | |
<!-- style --> | |
<style> | |
.hider { | |
display:none; | |
} | |
</style> | |
<!-- jquery script --> | |
<script> | |
$(function(){ | |
$('a.hider-toggle').click(function (){ | |
$this = $(this); | |
$this.next('.hider').toggle(); | |
$this.next().next('.hider-fake').toggle(); | |
}) | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment