Skip to main content

bootstrap-submenu

Project description

django-bootstrap-submenu
=========================

`bootstrap-submenu examples<https://vsn4ik.github.io/bootstrap-submenu/#html-examples>`_

说明:
==========

因为是bootstrap组件,所以jquery、bootstrap等推介使用:
jquery - pip install static-jquery
bootstrap - pip install django-bootstrap-themes
它们的使用方式和当前组件一样。

安装指南
===========

下载或者clone当前仓库,然后在项目目录中执行:
python setup.py install
or
pip install django-bootstrap-submenu

使用指南:
===========

settings.py

`
INSTALLED_APPS = (
'jquery',
'bootstrap_themes',
'bootstrap_submenu',
...
)
`

xxxx.html(模板文件使用)

`
{% load bootstrap_submenu%}
{% bootstrap_submenu_css%}
{% bootstrap_submenu_js%}
`

`
<div class="row">
<div class="col-sm-4 col-sm-offset-2 m-b">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" data-submenu>
Dropdown <span class="caret"></span>
</button>

<ul class="dropdown-menu">
<li class="dropdown-submenu">
<a tabindex="0">Action</a>

<ul class="dropdown-menu">
<li><a tabindex="0">Sub action</a></li>
<li class="dropdown-submenu">
<a tabindex="0">Another sub action</a>

<ul class="dropdown-menu">
<li><a tabindex="0">Sub action</a></li>
<li><a tabindex="0">Another sub action</a></li>
<li><a tabindex="0">Something else here</a></li>
</ul>
</li>
<li><a tabindex="0">Something else here</a></li>
<li class="disabled"><a tabindex="-1">Disabled action</a></li>
<li class="dropdown-submenu">
<a tabindex="0">Another action</a>

<ul class="dropdown-menu">
<li><a tabindex="0">Sub action</a></li>
<li><a tabindex="0">Another sub action</a></li>
<li><a tabindex="0">Something else here</a></li>
</ul>
</li>
</ul>
</li>
<li class="dropdown-header">Dropdown header</li>
<li><a tabindex="0">Something else here</a></li>
</ul>

</div>
</div>
</div>
<script>
$(function(){
$('[data-submenu]').submenupicker();//启动submenu组件
});
</script>
`


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-bootstrap-submenu-0.1.7.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

django_bootstrap_submenu-0.1.7-py2-none-any.whl (7.6 kB view details)

Uploaded Python 2

File details

Details for the file django-bootstrap-submenu-0.1.7.tar.gz.

File metadata

File hashes

Hashes for django-bootstrap-submenu-0.1.7.tar.gz
Algorithm Hash digest
SHA256 de540012b047c55c0bd931c34205920bdbf8c63904224e1abcddb711f9fe2caf
MD5 2bdd3cb5ebc4d12183d97b613b60b383
BLAKE2b-256 857e4acb478ca3598c444e06eaa05ebeeb0fbeca02dfe08981c0f335c29575e7

See more details on using hashes here.

File details

Details for the file django_bootstrap_submenu-0.1.7-py2-none-any.whl.

File metadata

File hashes

Hashes for django_bootstrap_submenu-0.1.7-py2-none-any.whl
Algorithm Hash digest
SHA256 820920b88d73fcfee719cccbc9a1bac60116da9569495f8ef5f4acd4b6fda0ac
MD5 e0e1b11d5ae564be480e9ce8d891ef55
BLAKE2b-256 18623922138bd29bb5ec70202e2618fec84bba45ba3af6c61a31252391f2ed9a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page