使用jquery實(shí)現(xiàn)圖文切換效果另加特效
更新時(shí)間:2013年01月20日 16:28:07 作者:
白天活干完,弄個(gè)jquery仿凡客誠品圖片切換的效果;以前寫的不是很好,今天重新做個(gè)jquery特效,其實(shí)很簡單,感興趣的朋友可以了解下哦,希望本文對你有幫助
前端開發(fā)過程中需要不斷學(xué)習(xí),不斷溫習(xí)。最近計(jì)劃白天繼續(xù)溫習(xí)jquery,晚上學(xué)習(xí)下原生javascript,然后利用一些時(shí)間做做網(wǎng)站推廣SEO來著。計(jì)劃暫時(shí)這些。
白天活干完,弄個(gè)jquery仿凡客誠品圖片切換的效果
以前寫的不是很好,今天重新做個(gè) jquery特效,其實(shí)很簡單,漠然回首也就那回事。
先來個(gè)原型吧,鋒利的jquery第一個(gè)例子,相信大家都很熟悉。沒錯(cuò),你絕對沒看錯(cuò)。
代碼如下
<div class="menu">
<div class="has_children">
<span>第一張</span>
<a href="">11111111</a>
<a href="">11111111</a>
<a href="">11111111</a>
<a href="">11111111</a>
<a href="">11111111</a>
<a href="">11111111</a>
</div>
<div class="has_children">
<span>第二張</span>
<a href="">22222222</a>
<a href="">22222222</a>
<a href="">22222222</a>
<a href="">22222222</a>
<a href="">22222222</a>
<a href="">22222222</a>
</div>
<div class="has_children">
<span>第三張</span>
<a href="">33333333</a>
<a href="">33333333</a>
<a href="">33333333</a>
<a href="">33333333</a>
<a href="">33333333</a>
<a href="">33333333</a>
</div>
<div class="has_children">
<span>第四張</span>
<a href="">44444444</a>
<a href="">44444444</a>
<a href="">44444444</a>
<a href="">44444444</a>
<a href="">44444444</a>
<a href="">44444444</a>
</div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// $(".has_children").click(function(){
// $(this).addClass("highlight").children("a").show().end().siblings().removeClass("highlight").children("a").hide();//點(diǎn)擊后效果
// })
$(".has_children").mouseover(function(){
$(this).addClass("highlight").children("a").show().end().siblings().removeClass("highlight").children("a").hide();//鼠標(biāo)移動過去效果
})
})
</script>
原書是點(diǎn)擊后的效果,我又加了個(gè)鼠標(biāo)移動上去。
現(xiàn)在適當(dāng)?shù)男薷南耤ss和js就可以了。
在線效果原型DEMO 在線效果圖文切換DEMO
白天活干完,弄個(gè)jquery仿凡客誠品圖片切換的效果
以前寫的不是很好,今天重新做個(gè) jquery特效,其實(shí)很簡單,漠然回首也就那回事。
先來個(gè)原型吧,鋒利的jquery第一個(gè)例子,相信大家都很熟悉。沒錯(cuò),你絕對沒看錯(cuò)。
代碼如下
復(fù)制代碼 代碼如下:
<div class="menu">
<div class="has_children">
<span>第一張</span>
<a href="">11111111</a>
<a href="">11111111</a>
<a href="">11111111</a>
<a href="">11111111</a>
<a href="">11111111</a>
<a href="">11111111</a>
</div>
<div class="has_children">
<span>第二張</span>
<a href="">22222222</a>
<a href="">22222222</a>
<a href="">22222222</a>
<a href="">22222222</a>
<a href="">22222222</a>
<a href="">22222222</a>
</div>
<div class="has_children">
<span>第三張</span>
<a href="">33333333</a>
<a href="">33333333</a>
<a href="">33333333</a>
<a href="">33333333</a>
<a href="">33333333</a>
<a href="">33333333</a>
</div>
<div class="has_children">
<span>第四張</span>
<a href="">44444444</a>
<a href="">44444444</a>
<a href="">44444444</a>
<a href="">44444444</a>
<a href="">44444444</a>
<a href="">44444444</a>
</div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// $(".has_children").click(function(){
// $(this).addClass("highlight").children("a").show().end().siblings().removeClass("highlight").children("a").hide();//點(diǎn)擊后效果
// })
$(".has_children").mouseover(function(){
$(this).addClass("highlight").children("a").show().end().siblings().removeClass("highlight").children("a").hide();//鼠標(biāo)移動過去效果
})
})
</script>
原書是點(diǎn)擊后的效果,我又加了個(gè)鼠標(biāo)移動上去。
現(xiàn)在適當(dāng)?shù)男薷南耤ss和js就可以了。
在線效果原型DEMO 在線效果圖文切換DEMO
您可能感興趣的文章:
- JQuery 動畫卷頁 返回頂部 動畫特效(兼容Chrome)
- 基于jQuery的彈出隱藏層的窗口特效
- 分享精心挑選的23款美輪美奐的jQuery 圖片特效插件
- 基于jQuery實(shí)現(xiàn)下拉收縮(展開與折疊)特效
- jquery顯示和隱藏div特效實(shí)例
- jquery實(shí)現(xiàn)圖片左右間隔滾動特效(可自動播放)
- jquery之超簡單的div顯示和隱藏特效demo(分享)
- jQuery焦點(diǎn)圖切換特效插件封裝實(shí)例
- 點(diǎn)擊彈出層外區(qū)域關(guān)閉彈出層jquery特效示例
- jquery購物車實(shí)時(shí)結(jié)算特效實(shí)現(xiàn)思路
- jquery定時(shí)滑出可最小化的底部提示層特效代碼
- JQuery插件iScroll實(shí)現(xiàn)下拉刷新,滾動翻頁特效
- 一款由jquery實(shí)現(xiàn)的整屏切換特效
- 推薦9款炫酷的基于jquery的頁面特效
- web前端設(shè)計(jì)師們常用的jQuery特效插件匯總
- jQuery+easyui中的combobox實(shí)現(xiàn)下拉框特效
- jQuery實(shí)現(xiàn)精美的多級下拉菜單特效
- jQuery+jRange實(shí)現(xiàn)滑動選取數(shù)值范圍特效
- 基于Jquery實(shí)現(xiàn)萬圣節(jié)快樂特效
相關(guān)文章
jQuery+PHP+Ajax實(shí)現(xiàn)動態(tài)數(shù)字統(tǒng)計(jì)展示功能
這篇文章主要介紹了jQuery+PHP+Ajax實(shí)現(xiàn)動態(tài)數(shù)字統(tǒng)計(jì)展示功能,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2019-12-12jquery實(shí)現(xiàn)側(cè)邊彈出的垂直導(dǎo)航
這篇文章主要介紹了jquery動畫特效結(jié)合css實(shí)現(xiàn)側(cè)邊彈出的垂直導(dǎo)航的方法及代碼分享,需要的朋友可以參考下2014-12-12jquery實(shí)現(xiàn)九宮格大轉(zhuǎn)盤抽獎(jiǎng)
jQuery九宮格大轉(zhuǎn)盤抽獎(jiǎng)代碼網(wǎng)頁特效,點(diǎn)擊抽獎(jiǎng)按鈕開始隨機(jī)抽獎(jiǎng)選擇獎(jiǎng)品,可設(shè)置起點(diǎn)位置、獎(jiǎng)品數(shù)量、轉(zhuǎn)動次數(shù)、中獎(jiǎng)位置參數(shù)2015-11-11通過jquery獲取上傳文件名稱、類型和大小的實(shí)現(xiàn)代碼
這篇文章主要介紹了在文件上傳到服務(wù)器之前,我們可以通過jquery來獲取上傳文件的名稱,類型和尺寸大小,需要的朋友可以參考下2018-04-04基于jQuery的一個(gè)擴(kuò)展form序列化到j(luò)son對象
jQuery沒有直接支持form到j(luò)son的序列化方法,目前網(wǎng)上有一個(gè)實(shí)現(xiàn)是這樣的2010-12-12關(guān)于jquery ajax 調(diào)用帶參數(shù)的webservice返回XML數(shù)據(jù)一個(gè)小細(xì)節(jié)
很早之前用jquery調(diào)用帶參數(shù)的WS返回XML格式數(shù)據(jù)的時(shí)候,傳參的時(shí)候會出現(xiàn)錯(cuò)誤。問了問度娘和谷哥,這娘兒倆一個(gè)德行,里面的多數(shù)帖子沒什么意義,你粘我,我復(fù)制你2012-07-07