찜기능을 만들었다. 아직 디비에는 못넣었다.
checkbox checked true 는
.prop('checked', true)로 하면 체크를 시켜버리는거였고
체크되어있는지 확인은 .is(":checked")였다.
체크되면 찜에 색이 바뀐다.
$("#heart").click(function(){
if($("#heart").is(":checked")){
$(".heart").attr('style','text-shadow: 0 0 0 #DC143C')
}else{
$(".heart").attr('style','text-shadow: 0 0 0 #f0f0f0')
}
});
찜테이블을 추가했다...
create table productPick(
productPickNum number primary key,
u_id varchar2(20) not null,
productName varchar2(40) not null,
CONSTRAINT fk_pickuid foreign key (u_id) references prj_member (u_id) ON DELETE CASCADE,
CONSTRAINT fk_pickpname foreign key (productName) references products (productName) ON DELETE CASCADE
);