現在の平日に開きたい平日のjQuery UIタブは次のとおりです。
<div id="tabs">
<ul>
<li><a href="monday.php">Monday</a></li>
<li><a href="tuesday.php">Tuesday</a></li>
<li><a href="wednesday.php">Wednesday</a></li>
<li><a href="thursday.php">Thursday</a></li>
<li><a href="friday.php">Friday</a></li>
<li><a href="saturday.php">Saturday</a></li>
<li><a href="sunday.php">Sunday</a></li>
</ul>
<script type="text/javascript">
$(function() {
$( "#tabs" ).tabs({
ajaxOptions: {
error: function( xhr, status, index, anchor ) {
$( anchor.hash ).html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo." );
}
}
});
});
</script>
タブを現在の曜日に開きたいのですが、次のようなものが機能することがわかっています。
.eq((new Date().getDay() || 7) - 1).click();
しかし、それを機能させることができず、助けていただければ幸いです。また、現在の日のタブに、平日ではなく「今日」という単語を表示したいと思います。
助けていただければ幸いです。
ありがとう、
ブレンドン