jQuery is not finding any elements. alert($(\"#testbutton\").length); displays 0 every time.
alert($(\"#testbutton\").length);
Am I doing something wrong?
My JS / jQuery cod
Call it on document ready as you can see here: http://jsfiddle.net/SwQUH/
$(document).ready(function() { alert($("#testbutton").length); });
If you just call it like that, the DOM isn't 'ready' and the HTML element doesnt yet exist.