以下代码仅适用一次。我不知道如何执行连续时间。
jQuery(document).ready(function () {
jQuery(".checkboxes").hide();
//toggle the componenet with class msg_body
jQuery(".Select").click(function () {
jQuery(this).next(".checkboxes").slideToggle(500);
if ($(".select").text() == "+") {
alert('hi');
$(".select").html() == "-"
}
else {
$(".select").text() == "+";
}
return false;
});
});
任何帮助将不胜感激。
答案 0 :(得分:0)
考虑&#34; .imgContainer&#34;是<img>
标记:
$(function () {
$(".checkboxes").hide();
//toggle the componenet with class msg_body
$(".select").click(function () {
$(this).next(".checkboxes").slideToggle(500);
if ($(".select").text() == "+")
$(".imgContainer").attr("src", "/images/logo1.png");
else
$(".imgContainer").attr("src", "/images/logo2.png");
return false;
});
});