Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中 
Explore DIRECTV

Enjoy HD DVR service in every room. Get every game every Sunday. Watch hit movies and shows anywhere. Bundle and save today!
From our sponsors
jQuery如何點按擊把a圖換成b圖?
Sep 22nd 2013, 23:37


 【按鈕b】                   「a圖」

  【按鈕c】            「b圖」 「c圖」 「d圖」

 我想要做點擊左邊的按鈕b(非圖片,是文字的按鈕)
 然後將a圖置換成b圖的效果

 自己研究發現找不太到方法
 例如我設定點按鈕b之後會有的動作:

 $("a.jpg").fadeOut();
 $("b.jpg").fadeIn();

 這樣子寫的話…只有第一行會成功
 b圖片它不會出來…

 可能是b圖也不知道要從哪裡出來?

  然後如果用replaceWith的話,我的b圖片會直接被cut到a圖上
  這樣等於我的網頁就少了一張圖片…

 請問應該改成怎麼寫比較好呢?
  或是沒有這種方法呢?

 懇請多多指點,謝謝!!

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends:

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜

    linevpn 發表在 痞客邦 留言(0) 人氣()