开发者

Can jQuery Coda-Slider rewrite the title of the page on tab change?

We are building a site with Coda-Slider and are wondering if its possible to change the title of the page when changing tabs (without having to refresh the page)? I'm not that great at jQuery yet (let alone straight javascript), so I'm not sure if this is even possible. We're using version 2.0 of Coda-Slider and loading the latest jQuery libra开发者_StackOverflowries from Google.


You could try setting the document.title property if there's some "on change" callback provided by the coda slider.

If it doesn't provide a callback you'll just have to wire up a click event to each tab manually and try to change the title from there. From their demo it looks like each tab an <h2 class="title">Panel 1</h2>. Something along the lines this of should work.

$(".title").click(function(){
    document.title = " Whatever title you want goes here";
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜