toggleClass() [ jQuery method]
สวัสดีจ้า วันนี้เราจะมาแนะนำ method ของ jQuery ที่ชื่อว่า toggleClass() เราจะมาดูกันว่า เจ้านี่ใช้ทำอะไรได้
toggleClass การทำงานของ method นี้คือ มันจะเพิ่มและลบ class จาก element ที่ถูกเลือก ชื่อก็บอกอยู่แล้วว่า toggle นั่นคือมีการสลับไปมา โดยการที่…