jQuery 篩選器2this
// 因爲$()只能輸入字符串$('#li:eq(1)'),可經過.eq()來傳入。 // 獲取this標籤中的指定屬性 $(this).eq(1) // 獲取第一個元素 $(this).first() // 獲取最後一個元素 $(this).last() // 檢查當前元素是否含有某個特定類,有返回true,沒有false。 $(this).hasClass(class)