Skip to content

firecreek/BlockAnywhere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Distance Js

Description

You can put blocks into the following:

  • Layout
  • Views
  • Elements
  • Blocks (with a change, see below)
  • Blocks within blocks
  • Node body and excerpt
  • Any node field (if defined in BlockHelper::nodeFields)

Usage

Require

* >= jQuery 1.4

How to use

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

<script type="text/javascript">
	Distance.init();
</script>

specify 3 attributes to the parent elements ([data-with-distance] optional, data-lat, data-lng) and inside the parent attribute put the element class=distance

<li data-with-distance="true" data-lat="52.4800" data-lng="-1.9100">
		Distance from your location to Birmingham about : 	<span class="distance"></span>
	</li>

About

Put an block anywhere in Croogo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published