JQuery 탭을 사용하고 있습니다. 클릭 할 때, 나는 단지 경고 메시지를 표시하려고 시도하고있다. 둘 중 어떤 것도 작동하지 않습니다. 왜 탭 부분에서 일반 html로 옮길 때 완벽하게 작동하는지 모르겠습니다. addTab에서Jquery 탭 클릭시 옵션
() JQuery와 탭에서 :
이 tabContentHtml = "<div class=\"favorite\" status=\"off\">☆</div>"
내 자신의 자바 스크립트 코드 : 나는 탭에서 스타를 참조 할
$(".favorite").click(
function(){
alert("in here");
var current_status = $(this).attr("status");
if(current_status == "off"){
$(this).html("★");
$(this).css({"color":"gold"});
$(this).attr("status", "on");
}else if (current_status == "on"){
$(this).html("☆");
$(this).css({"color":"#EFEFEF"});
$(this).attr("status", "off");
}
}
);
주, 그것은 그냥 여기에 관련 코드는 반응이 없다!
시작,
activate
방법으로 호출되고 또한 jquery.js가 –