I have a tabstrip that works for hash urls, but one of the tabs does a refresh but should stay on the same view.
<div data-role="tabstrip" id="tabstripMainApp">
<a href="#viewJobs" data-icon="home">Current</a>
<a href="#viewJobsCompleted" data-icon="more">Completed</a>
<a href="#viewSettings" data-icon="about">Settings</a>
<a class="btnRefreshView" data-icon="refresh">Refresh</a>
</div>
The said tab fires this event successfully:
$('.btnRefreshView').bind('click', function () {
console.log('Refresh view :', window.location.hash)
if (window.location.hash == '#viewJobsCompleted') {
dsviewJobsCompleted.read();
} else {
dsviewJobs.read();
}
})
But then the btnRefreshView tab shows as active when I want the prior tab that was active to be active.
How do I make a different tab active please?
<div data-role="tabstrip" id="tabstripMainApp">
<a href="#viewJobs" data-icon="home">Current</a>
<a href="#viewJobsCompleted" data-icon="more">Completed</a>
<a href="#viewSettings" data-icon="about">Settings</a>
<a class="btnRefreshView" data-icon="refresh">Refresh</a>
</div>
$('.btnRefreshView').bind('click', function () {
console.log('Refresh view :', window.location.hash)
if (window.location.hash == '#viewJobsCompleted') {
dsviewJobsCompleted.read();
} else {
dsviewJobs.read();
}
})
How do I make a different tab active please?