2026/04/22
jQuery基礎、Javascriptの基本のおさらい
jQuery(function($){
// ifの書き方
function checkEmpty(BTN){
if(BTN.hasClass(‘empty’)){
console.log(‘YES’);
}else{
console.log(‘NO’);
}
}
let cel = $(‘.cel’);
cel.on(‘click’,function(){
let thisCel = $(this);
checkEmpty(thisCel);
});
}); // end jQuery!!