php - jquery Autocomplete click event -


<div id="display">     <div align="left" class="display_box">         <a class="test" href="#">             <img style="width:25px; float:left; margin-right:6px" src="user_img/gow.jpg">         </a>         <input type="hidden" id="uid" value="3">         <b>b</b>ack&nbsp;<b>b</b>ack<br>         <span style="font-size:9px; color:#999999">back</span>     </div>     <div align="left" class="display_box">         <a class="test" href="#">             <img style="width:25px; float:left; margin-right:6px" src="user_img/gow.jpg">         </a>         <input type="hidden" id="uid" value="3">         <b>b</b>ack&nbsp;<b>b</b>ack<br>         <span style="font-size:9px; color:#999999">back</span>     </div> </div> 

i making auto complete search function images in thumbnail facebook , getting html after ajax call . want if user clicks on div class display_box want value of hidden field in div...

i tried code not capture click event how ever if use #display click event capturing whole div.

$('.display_box').click(function() {     var id =$(this).find('input[type=hidden]').val(); });     

make sure adding jquery file , $ not conflicted. can use line before writing js code.

$ = jquery.noconflict(); 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -