我正在使用两种流行的技术,jquery选项卡和jPages。不幸的是,下面的目标似乎没有合作。这可以在我下面的三个页面的当前设置中修复吗?
$("div.holder").jPages({containerID : "card-row"});
第1页(使用jquery标签):
<script>
$(function() {
$( "#tabs" ).tabs({
beforeLoad: function( event, ui ) {
ui.jqXHR.error(function() {
ui.panel.html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo." );
});
}
});
});
</script>
<div id="tabs">
<ul><li><a href="pages/page-2.php">Your Collection</a></li>
</ul>
</div>
第2页(使用ajax):
<script>
$(document).ready(function(){
$.get("/pages/page-3.php",{}, function(data, statusTxt){
$('#collection-table .search-results').html(data);
});
});
</script>
<div id="#collection-table">
<div class="search-results">
<!-- get page 3 contents-->
</div>
</div>
第3页:
<script type="text/javascript" src="../scripts/jquery.js"></script>
<script type="text/javascript" src="../scripts/jpage.js"></script>
<script>
$(function(){
$("div.holder").jPages({
containerID : "card-row",
previous : "?",
next : "?",
perPage : 20,
delay : 20
});
});
</script>
<div class="holder">
<!-- pagination pages-->
</div>
<tbody id="card-row">
<!--rows-->
</tbody>