开发者

jQuery custom tabs with next/prev links

I am convert the jquery-ui tabs into a more basic version that is easily customisable although I have come across a couple of problems:

  • How would I change the code into a reusable plugin/function that I can then use in the next/prev links on click开发者_JAVA技巧?
  • Also I have a problem with the second tab is adding the next link.

  • Would there be any point in adding the cookie plugin to remember the tab also?

I have tried to also write the code so that it adds the tab ID to the hash of the URL allowing direct bookmarking to a tab if the URL has a hash on the end.

JS Fiddle code can be viewed here: http://jsfiddle.net/pmnzT/21


I've fixed next and prev links here you could find a working version. Second next link didn't appear because there is an error in the html, you inverted tab2 with tab4 now it's fixed.

For remember your position why you don't use the localstorage? Is a lighter solution than use cookies. here some info :)

For transform your code in a plug-in you could check this out link.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜