1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/hylun-BootstrapPager

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
Внести вклад в разработку кода
Синхронизировать код
Отмена
Подсказка: Поскольку Git не поддерживает пустые директории, создание директории приведёт к созданию пустого файла .keep.
Loading...
readme.md

An exquisite Bootstrap Pagination plugin

This is a javascript implementation Bootstrap Pagination plugin, very fine small, you do not need to rely on any third-party library, only through a simple reference call, you can dynamically display Bootstrap paging components. 中文

Style one

Style two

style dependencies

usage

Download attachments.

Copy the dist/bootstrapPager.js file to your project directory, such as the js directory, Add a reference to this js in the page:

<script type="text/javascript" src="~/js/bootstrapPager.js"> </script>

** basic usage **

Document.write (Pager ({
    TotalCount: 150 // total number of 150
}));

Its that simple!

** Advanced usage **

Document.write (Pager ({
    TotalCount: 150,  // total number of 150
    PageSize: 6,      // Show 6 per page, default 10
    ButtonSize: 6,    // show 6 buttons, default 10
    PageParam: 'p',   // The page parameter is named 'p' and defaults is 'page'
    ClassName: 'pagination',// paged style
    PrevButton: 'prev',     // previous button
    NextButton: 'next',     // next page button
    firstButton:'first',     // first page button
    lastButton:'last',       // last page button
}));

You can also use the built-in method:

Document.write ('url in the page parameter value:' + Pager.getParam ('page'));
Document.write ('replace Url in the page parameter value of 3 get the address:' + Pager.replaceUrl ('page', 3));

API

/**
* Get the paging html string for displaying paging
* @ Param options json objects, attributes are:
Total total number of total
* PageSize      shows the number of pages per page, the default 10
* ButtonSize    show the number of buttons, the default 10
* PageParam     page parameter name, default is 'page'
* ClassName     paging style, defaults to 'pagination'
* PrevButton    previous button, default <<
* NextButton    next page button, default >>
* firstButton   first page button, not displayed by default
* lastButton    last page button, not displayed by default
**/
function Pager (options);

/**
* Get the url parameter
* @ Parame name The name of the parameter to be obtained
**/
function Pager.getParam (name);

/**
* Replace urlm with a value for a parameter
* @ Parame name The name of the parameter that needs to be replaced
* @ Parame name The value of the parameter to be replaced
**/
function Pager.replaceUrl (name, value);

Author

Hylun blog

Copyright & License

Copyright (c) 2017 Hylun

BootstrapPager is available under the MIT license. See the LICENSE file For more information.

Комментарии ( 0 )

Вы можете оставить комментарий после Вход в систему

Введение

Это очень изящный плагин для разбивки на страницы Bootstrap, реализованный на JavaScript. Вам не нужно полагаться на какие-либо сторонние библиотеки — достаточно простого вызова по ссылке для динамического отображения компонента разбивки на страницы Bootstrap. Развернуть Свернуть
MIT
Отмена

Обновления

Пока нет обновлений

Участники

все

Недавние действия

Загрузить больше
Больше нет результатов для загрузки
1
https://api.gitlife.ru/oschina-mirror/hylun-BootstrapPager.git
git@api.gitlife.ru:oschina-mirror/hylun-BootstrapPager.git
oschina-mirror
hylun-BootstrapPager
hylun-BootstrapPager
master