كود تعدد الصفحات بشكل جديد
يعمل على جميع النسخ
صورة له
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذه الصورة]
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط]
الكود يوضع:جميع الصفحات
- الكود:
$(function(){
$('head').append('<style>.paging a, .paging b {text-decoration:none;background-color: #e9e9e9;border: 1px solid #afafaf;border-radius: 3px;box-shadow: 1px 1px 1px #ddd;color: #717171 !important;padding: 5px 8px;cursor: default;}.paging a:hover {background: #fff;}.paging b {background: #fff;border-color: #ccc;box-shadow: 0 0 5px #ccc inset;}.paging .disabled {background: #eee !important;border-color: #ccc !important;box-shadow: none;color: #999 !important;cursor: not-allowed;}</style>');
var sPages = jQuery('.paging');
if (sPages.length) {
sPages.html(sPages
.html()
.replace(/<\/a> :/g, '<\/a> ')
.replace(/<\/a>, <b>/g, '</a> <b>')
.replace(/>,.<a/g, '> <a')
);
};
var ante = jQuery('.paging .sprite-arrow_prosilver_left').length;
var prox = jQuery('.paging .sprite-arrow_prosilver_right').length;
if (ante && prox ) {
jQuery('.paging .sprite-arrow_prosilver_right').replaceWith('<span title="الذهاب إلى الصفحة التالية.">التالى »</span>');
jQuery('.paging .sprite-arrow_prosilver_left').replaceWith('<span title="انتقل إلى الصفحة السابقة.">« السابق</span>');
} else if (ante) {
jQuery('.paging').append('<a class="disabled" title="الذهاب إلى الصفحة التالية." style="margin-left: 5px;">التالى »</a>');
jQuery('.paging .sprite-arrow_prosilver_left').replaceWith('<span title="انتقل إلى الصفحة السابقة.">« السابق</span>');
} else if (prox) {
jQuery('.paging a:first').after('<a class="disabled" title="الذهاب إلى الصفحة التالية.">« السابق</a>');
jQuery('.paging .sprite-arrow_prosilver_right').replaceWith('<span title="الذهاب إلى الصفحة التالية.">التالى »</span>');
}
$('.paging a:first').remove();
});