Skip to content

Commit 48abf90

Browse files
committed
adding readme
1 parent 95d9f76 commit 48abf90

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,39 @@
11
# MT.BootstrapTabsLazyloader.js
22
Lazy Loader For Bootstrap Tabs
3+
4+
This package adds lazyloading option to bootstrap tabs, so every tab's content will load when the user clicks it.
5+
6+
7+
#How To Use
8+
##Install
9+
10+
If you use nuget package manager, write down this command in nuget package manager console
11+
12+
<code>Install-Package MT.BootstrapTabsLazyLoader.js</code>
13+
14+
This packages also depends on: <br />
15+
Jquery >=2.0.0<br />
16+
Bootstrap >=3.0.0<br />
17+
FontAwsome >=4.2.0<br />
18+
19+
If you don't use nuget package manager, just download source code, and copy MT.BootstrapTabsLazyLoader.js into your scripts folder.
20+
21+
22+
##Using
23+
1- Add a reference to **/Scripts/MT.BootstrapTabsLazyLoader.js** to the scripts part of your code, after **jquery.js** and **bootstrap.js**
24+
25+
2- add class **.lazyloading** to nav-tabs (bootstrap tabs ul tag)
26+
27+
3- add **data-url** to the **anchor** tag of every tab you want to lazyload. this attribute will contain the url of partial pages you want to load it into the tab.
28+
**Example**
29+
30+
31+
<!-- Nav tabs -->
32+
<ul class="nav nav-tabs lazyload">
33+
<li class="active"><a href="#fullDesc" data-toggle="tab">Description</a></li>
34+
<li><a href="#specificationDetails" data-toggle="tab">Specifications</a></li>
35+
<li><a href="#relatedProducts" data-toggle="tab" data-url="@Url.Action("relatedproducts", new { model.product.id})">Related Products</a></li>
36+
<li><a href="#files" data-toggle="tab" data-url="@Url.Action("getproductfiles", new { model.product.id })">Product Files</a></li>
37+
<li><a href="#videos" data-toggle="tab" data-url="@Url.Action("getproductvideos", new { model.product.id })">Product Videos</a></li>
38+
</ul>
39+

0 commit comments

Comments
 (0)