Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(function(){
- $(".styleinput #inputUserfilter").keyup(function(){
- var index = $(this).parent().index();
- console.log('test');
- var nth = "#tableUser td:nth-child("+(index+1).toString()+")";
- var valor = $(this).val().toUpperCase();
- $("#tableUser tbody tr ").show();
- $(nth).each(function(){
- if($(this).text().toUpperCase().indexOf(valor) < 0){
- $(this).parent().hide();
- }
- });
- });
- $("#inputUserfilter").blur(function(){
- $(this).val("");
- });
- });
- </script>
- <div class="styleinput" >
- <label>Filtrar: </label>
- <input type="text" id="inputUserfilter"/>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement