###解決したいこと
wordpressにてウィジェットのカレンダーの曜日(thead部分)を日本語から英語に書き換えたいです。jqueryにてテキストの書き換えをしたいのですがどのように指定したらよいでしょうか。
例 下記のようなコードにしたいです。
<th scope="col" title="月曜日">M</th> <th scope="col" title="火曜日">T</th> <th scope="col" title="水曜日">W</th> <th scope="col" title="木曜日">T</th> <th scope="col" title="金曜日">F</th> <th scope="col" title="土曜日">S</th> <th scope="col" title="日曜日">S</th>
###html
<li id="calendar-3" class="widget widget_calendar"><div id="calendar_wrap" class="calendar_wrap"><table id="wp-calendar"> <caption>2016年10月</caption> <thead> <tr> <th scope="col" title="月曜日">月</th> <th scope="col" title="火曜日">火</th> <th scope="col" title="水曜日">水</th> <th scope="col" title="木曜日">木</th> <th scope="col" title="金曜日">金</th> <th scope="col" title="土曜日">土</th> <th scope="col" title="日曜日">日</th> </tr> </thead>
###試したこと
$(".widget_calendar thead tr th title").val("月曜日").text("M");
$(".widget_calendar thead tr th title").val("月曜日").html("M");
を試してみましたがうまくいきません。
どのセレクタを指定し、どうやってtitleの値を取得しテキスト部分を書き換えられるでしょうか。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/10/30 08:44