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:
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()