Re: [問題] 關於這個東西:#mainContainer img[title]

看板Web_Design作者 (沉默是金。)時間16年前 (2010/06/04 02:06), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串3/3 (看更多)
※ 引述《allen880808 (Allen)》之銘言: : 抱歉 因為還是有點問題所以自己回自己的文 : 如果有需要的話我可以把前一篇刪除 : 其實那段完整的語法如下: : $("#mainContainer img[title]").tooltip({ : offset: [10, 2], : effect: 'slide' : // add mainContainermic plugin with optional configuration for bottom edge : }).mainContainermic({ bottom: { direction: 'down', bounce: true } }); : } : 翻譯成人話應該是"mainContainer(id)裡有title的圖片全都套用以下設定(offset..略) : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ : 除此之外 有title的圖片則套用以下設定(bottom...略)" : 而我的問題是 我希望把它改成"只有id為aaa跟bbb的套用以下設定(offset..略) : ^^^^^^^^^^^^^^^^ : 除此之外 有title的圖片則套用以下設定(bottom...略)" : 請問該如何修改呢? 希望各位能不吝賜教 謝謝 以程式碼來說的話,你所描述的需求會是 var all_img= $("#mainContainer img[title]"); var spec_img = $("#aaa,#bbb"); all_img.not(spec_img).mainContainermic( { bottom: { direction: 'down', bounce: true } }); spec_img.tooltip({ offset: [10, 2], effect: 'slide' }); tooltip跟mainContainermic其實是完全獨立的, 會寫在一起只是應用了 method chain 的魔幻技巧。 (可 google "method chain" 查看更多訊息) -- 我:一半的日子讓你說,我聽你說你的所有______________________________________ ______________________________________一半的日子我想說,對你說過去的所有:我 _______________________________________________________ 在討論中妥善扮演兼具聆聽與分享的角色,是我們一生的課題。 _______________________________________________________ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.70.170.11

06/28 12:56, , 1F
感謝 比較有點頭緒了
06/28 12:56, 1F
文章代碼(AID): #1C1-ygAk (Web_Design)
文章代碼(AID): #1C1-ygAk (Web_Design)