have this code:
$.post("auth.php", {pass : pass}, function(data) {
var x = $(data).find("span#c");
$("div#addform").show();
menu.html(data);
console.log(data);
console.log(x);
alert(x);
and php:
if($ath['mail'] != $pass){ echo "<center> try another pass )</center>";} else {
// print all db
echo("<span id=\"c\">OK</span><br>");
$sql = "SELECT * FROM user";
$result=mysql_query($sql);
in response gets text/html but in console i get just "[]" and [object Object] if do alert(x) all data loads perfect in menu.html(data); but why i can't get my 'x' span what i'm doing wrong?