replaceState
使用replaceState(window.history.replaceState)代替hashnav的hash(document.location.hash)。
replaceState信息
- 類型:
- boolean
- 默認:
- false
- 舉例:
- true
- 啟用版本:
- 4.0.0
效果演示
使用方法示例
<script language="javascript">
var mySwiper = new Swiper('.swiper-container',{
hashNavigation: {
replaceState: true,
},
})
</script>
轉載原創文章請注明:文章轉載自:Swiper中文網 [http://www.aichat.com.cn]
本文地址:http://www.aichat.com.cn/api/hash/319.html