Fork the repository or download js/css files from dist directory.
Include jQuery and this plugin on a page.
//Desired dom elementvar previewBody = $'body'minimap;
heightratio of the view port. ratio can be in the range [0.0, 1.0). (default: 0.6)
widthratio of the view port. ratio can be in the range [0.0, 0.5). (default: 0.05)
Margin
topratio of the view port. ratio can be in the range (0.0, 0.9]. (default: 0.035)
Margin
leftorright(based onpositionproperty) ratio of the view port. ratio can be in the range (0.0, 0.9]. (default: 0.035)
positionof the minimap. Supported positions are:
'right' (default)'left'
touchsupport. (default: true)
linear
animationsupport for scrolling. (dafault: true)
Smooth scroll delay in milliseconds. (default: 200ms)
Set
positionproperty.positioncan be either'left'or'right'
Set
heightRatioproperty.
Set
widthRatioproperty.
Set
offsetHeightRatioproperty.
Set
offsetWidthRatioproperty.
Set
smoothScrollproperty
Set
setSmoothScrollDelayproperty.
onPreviewChangecallback will be triggered for the below cases:
Show preview
Hide preview
Toggle Preview
Mini-map with default values
var previewBody = $'body'minimapheightRatio : 0.6widthRatio : 0.05offsetHeightRatio : 0.035offsetWidthRatio : 0.035position : "right"touch: truesmoothScroll: truesmoothScrollDelay: 200{};
Use the below css classes for customization
.minimap- Mini-map area
.miniregion- Mini-map view area
find gives result in both the page & its previewThis plugin is licensed under the MIT license.
Copyright (c) 2014 Prince John Wesley