要使選單能夠在點選或按Esc鍵時隱藏,需要新增如下處理程式:onclick="..."
不要只是建立一個標記,我們要將一個onclick事件附加到縮圖並呼叫lightbox來顯示大圖。
Instead of just creating an tag, attach an onclick event to it and call the lightbox to show the large image.