我有以下标记:
<div class="scheduleNav">
<a id="btnPrevDate" href="#" class="ui-button-icon-only" />
<span id="currentDate">???</span>
<a id="btnNextDate" href="#" class="ui-button-icon-only" />
</div>
以及以下 javascript:
var rightNow = new Date(); // Default to today
var dd = rightNow.getDate();
var mm = rightNow.getMonth() + 1;
var yyyy = rightNow.getFullYear();
if (dd < 10) { dd = '0' + dd; }
if (mm < 10) { mm = '0' + mm; }
var today = (mm + "/" + dd + "/" + yyyy);
var prev = $('#btnPrevDate').button({ icons: { primary: "ui-icon-seek-prev"} });
var next = $('#btnNextDate').button({ icons: { primary: "ui-icon-seek-next"} });
var currentDate = $('#currentDate');
currentDate.text(today);
jsbin 在这里:http ://jsbin.com/AgiSICE/1/edit?html,js,output
如何防止第一个锚吞下跨度?