이 모든 것이 정말 이상하게 보일 수 있습니다. var를 .html ('g'+ index)로 참조하려고 할 때 객체 예상 오류가 발생합니다. 나는 var를 만드는 것이 최선이 아니라고 생각하니?.html을 사용할 때 이상한 객체 예상 오류
var g0 = "<?php getFiles("gallery/Audience"); ?>";
var g1 = "<?php getFiles("gallery/Exhibition"); ?>";
var g2 = "<?php getFiles("gallery/registration"); ?>";
var g3 = "<?php getFiles("gallery/Speakers"); ?>";
$(".galleryButton").each(function (index) {
$(this).click(function(){
$('#galleria').html();
$('#galleria').html('g'+index);
initiateGallery();
}).mouseover(function() {
$(this).css('cursor', 'pointer');
$(this).css('backgroundColor', '#002E53');
}).mouseout(function(){
$(this).css('backgroundColor', '#000');
});
});
'$ ('# galleria') 줄로 무엇을하려하고 있습니까? html();'? –