在jsfiddle中使用jquery完全匹配的代码

First I want to say that the code in jsfiddle works exactly as I'm expecting. However, when I try to insert it in my page, it does not work. I am using

 get.ajax 

To move html with php a mysql data into a div named #latest-divs. I have a form with an

 input#search

button that gets val() when .bind('input property...) and checks if there is exact match in the child divs of #latest-divs. I call these child elements #latestblock If there is exact match, then the event should execute, which, as I mentioned above, works in the jsfiddle but dies on my site. I have attempted everything I could think of:

Load in php file Load from head Load from body Load with and without "CDATA" Change my jquery version My site is codefault (dot) org. The jsfiddle link is http://jsfiddle.net/gAnyM/10/. As of right now, I am loading the second part (random positioning of divs) from script/latest-topics.php and the first part in head, from index.php.

are you sure you have it inside a:

$(document).ready( function() {
  // code here
});

?

The dom needs to be ready before you bind things

jsfiddle adds this for you automatically

Try another kind of event

$('input#search').bind('change keyup', function()