i have data this
<div class="small-box bg-aqua"> <div class="box-tools pull-right"> <button class="btn btn-box-tool" data-widget="remove"><i class="glyphicon glyphicon-edit white"></i></button> </div> <div class="inner"> <h4 class="show"><?=$row->name?></h4> <input type="text" name="name" class="form-control hide" value="<?=$row->name?>" /> <p>customer</p> </div> </div> and have jquery this
$('.glyphicon-edit').click(function() { var x = $( ).find('.inner').find('.hide').val(); alert(x); }); how can hide class value, in jquery?
try this:
$('.glyphicon-edit').click(function() { var x = $(this).closest('.small-box').find('input[type="text"]').val(); alert(x); });
Comments
Post a Comment