views:

173

answers:

1

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 libraries from Google.

A: 

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";
});
R0MANARMY