JSFiddle - React, Tailwind, and code Playground
HTML
<div id="searchelement">
<div class="search"><input type="text" name="search" id="searchbox" value="" /></div>
<div class="searchbutton" id="sbutn"><button type="button">Search</button></div>
</div>
</br>
<div id="myConnections">
<div class="left" style="width:100px; height:100px;">
<img style="width:70px; height:70px;" src="http://img805.imageshack.us/img805/8030/picture1jd.jpg" alt=""><br>
person1_xyz
</div>
<div class="left" style="width:100px; height:100px;">
<img style="width:70px; height:70px;" src="http://img685.imageshack.us/img685/3715/picture2ju.jpg" alt=""><br>
person2 abc
</div>
</div>
CSS
.search {
float:left;
}
.searchbutton {
float:left;
}
JavaScript
$(document).ready(function() {
$('#sbutn').click(function() {
$v = $('#searchbox').val();
console.log($('#myConnections>div').find("div:contains("+$v+")"));
});
});