所以,讓我們說我想隱藏一個div或跨度與特定類的CSS。選擇多個,但不是所有的HTML類
對於第一個X數量的實例,有沒有這樣做,或者更好的是,除了最後一個之外,還可以這樣做嗎?我想這將需要JavaScript。
僞我想應該是這樣的
if divname.class = "XYZ" {
select all instances -1
execute code that inserts random programmatic id into each class
execute code that hides all ids except the last one
}
我在正確的軌道上?或者有沒有更簡單/更好的方法?
是你沒有使用JQuery? – RSG 2012-02-24 21:36:44