다음은 두 개의 jquery 코드입니다. 첫 번째 링크를 클릭하면 텍스트 메시지가 인쇄되고 두 번째 링크는 링크를 클릭하면 div가 아래로 이동합니다. 두 번째 코드를 첫 번째 코드와 병합하여 링크를 클릭하면 첫 번째 코드에서와 같이 메시지가 표시되고 두 번째 코드 에서처럼 #votebox가 아래로 슬라이드되어 콘텐츠가 표시됩니다. 나는 어떤 도움을 매우 감사 할 것입니다.두 개의 작은 jquery 코드 병합
이$("a.vote_up").click(function(){
the_id = $(this).attr('id');
$("span#votes_count"+the_id).fadeOut("fast");
$.ajax({
type: "POST",
data: "action=vote_up&id="+$(this).attr("id"),
url: "votes.php",
success: function(msg)
{
$("span#votes_up"+the_id).fadeOut();
$("span#votes_up"+the_id).html(msg);
$("span#votes_up"+the_id).fadeIn();
//Here, I want to slide down the votebox and content div (from code below).
}
});
});
다음 코드는 그 안에 votebox의 사업부 및 표시 내용을 슬라이드, 나는 위의 코드에서 그것을 포함 할. 어떤을위한
$("a.vote_up").click(function(){
var id=$(this).attr("id");
var name=$(this).attr("name");
var dataString = 'id='+ id + '&name='+ name;
//I want to include this votebox in above code.
$("#votebox").slideDown("slow");
$("#flash").fadeIn("slow");
$.ajax({
type: "POST",
url: "rating.php",
data: dataString,
cache: false,
success: function(html){
$("#flash").fadeOut("slow");
//and want to use this div as well.
$("#content").html(html);
}
});
});
감사합니다 도움.
마크 업을 게시하여 수행하려는 작업에 대한 컨텍스트를 가질 수 있습니까? – prodigitalson