フォロー ボタン (twitter など) を作成しようとしていますが、大部分は機能していますが、PHP スクリプトから HTML を生成すると、そうではありません。
これが機能していることを示すフィドルは次のとおりです。http://jsfiddle.net/MCam435/HpAWH/10/
素晴らしい作品:)
ただし、PHPから生成すると:
PHP スクリプト
function getTalent($row) {
return "<div class='talent_result_wrapper' data-experience='" . $row['divTagExp'] . "' data-salary='" . $row['divTagSal'] . "'>
<div class='talent_result_header'>
<span class='talent_result_head'>ID: </span>" . $row['CandidateID'] . "
</div>
<ul>
<li><strong>Resides: </strong>" . $row['Town'] . "</li>
<li><strong>Salary Required: </strong>£" . $row['SalaryMin'] . "</li>
<li><strong>Experience: </strong>" . $row['CandidateExperience'] . " Years </li>
<li><strong>Industy: </strong>" . $row['PrimarySector'] . "</li>
<li><strong>Specialism: </strong>" . $row['PrimarySector'] . "</li>
<br>
<div id='follow1'><a href='#' class='follow' id='1'><span class='follow_b'> + Tag </span></a></div>
<div id='remove1' style='display:none'><a href='' class='remove' id='1'><span class='remove_b'> - UnTag </span></a></div>
</div>";
}
メインページ
while($row = mysqli_fetch_array($result2)) {
echo getTalent($row);
}
出力はまったく同じですが、div 間の切り替えが機能しませんか?