Giter VIP home page Giter VIP logo

breadcrumb.js's Introduction

breadcrumb.js

Simple javascript library to create breadcrumbs in a web page based on the site url.


How to use:

1- Load the library file to your page.

<script src="breadcrumb.js"></script>

2- Initialize breadcrumb.js by adding the next code in your page.

<script>
	breadcrumb.init(
		container_id_to_render, 
		{
			stopLink: {}, 
			urlDivider: '', 
			divider: '', 
			groupCountainerTag: '', 
			containerTag: '', 
			cssStyleGroupContainer: '', 
			cssStyleTag: '', 
			cssStyle: '', 
		}
	);	
</script>

3- Enjoy it!


Explanation:

breadcrumb.init(container_id_to_render, config).

container_id_to_render: Id of the breadcrumbs container.
	<div id="breadcrumb" class="any_class"></div>

config: Configuration parameters.
	stopLink: Array of actions that you don't want to be render as links.
			stopLink: {
				edit: 'edit',
				show: 'show', 
			}
			

	urlDivider: Set the char where to split the url. By default takes "/". 	
		http://localhost/user/create

	divider: Divider to show between links in the breadcrumbs. By default takes " ".
		Home User Create

	groupCountainerTag: Cointainer to group all the links. Could be a list like <ol> or <ul>. Just write ul or ol, no need of <>.

	containerTag: Container of each link. Could be <li> if groupCountainerTag is a list tag. Just write li or 	span, no need of <>.

	cssStyleGroupContainer, cssStyleTag and cssStyle: Css styles for each container.

breadcrumb.js's People

Contributors

samyoteroglez avatar

Watchers

Jason Riddle avatar James Cloos avatar  avatar

Forkers

pjaclark

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.