0
我試圖讓我的投資組合的網站過濾庫,分配一個ID,就只顯示圖片帶有class = 「廊-1」(過濾器:」名爲.gallery-1' )使用<a href="http://miromannino.github.io/Justified-Gallery/" rel="nofollow">http://miromannino.github.io/Justified-Gallery/</a></p> <pre><code><button id="Gallery-1" >Gallery 1</button> </code></pre> <p>的想法是,當我點擊按鈕的畫廊1上單擊事件
$('button').click(function(){
$('#mygallery').justifiedGallery({
rowHeight : 200,
lastRow : 'justify',
margins : 30,
filter: '.Gallery-1'
})
})
是否有可能分配該被點擊 「過濾器」 按鈕的ID?這怎麼能做到?