Simple search engine issues
Posted
by
user1184100
on Stack Overflow
See other posts from Stack Overflow
or by user1184100
Published on 2012-04-11T11:27:16Z
Indexed on
2012/04/11
11:28 UTC
Read the original article
Hit count: 136
jQuery
Simple search engine issues..
I'm creating a simple search engine but i'm not able to figure out how to go about it. So here's what I have tried.
I need to get the results based on first/last name..
JSFiddle : http://jsfiddle.net/WSPbP/
JS
$(document).ready(function() {
$('#sbutn').click(function() {
$v = $('#searchbox').val();
console.log($('#myConnections >div').find("div:contains("+$v+")"));
});
});
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="picture1.jpg" alt=""><br>
person1_xyz
</div>
<div class="left" style="width:100px; height:100px;">
<img style="width:70px; height:70px;" src="picture2.jpg" alt=""><br>
person2 abc
</div>
</div>
© Stack Overflow or respective owner