Permalink
Browse files

Added documentation for Tire.js compatibility

  • Loading branch information...
1 parent 7626ce3 commit 4b8a2ca2028a08d5e5ba7dc5b46b042dd5344ec2 @mmarcon committed Mar 10, 2013
Showing with 39 additions and 21 deletions.
  1. +1 −2 src/examples/example.tire.html
  2. +16 −5 src/jhere.js
  3. +2 −3 src/tire.adapter.js
  4. +1 −3 web/css/main.css
  5. +4 −4 web/css/main.scss
  6. +14 −3 web/docs.html
  7. +1 −1 web/index.html
@@ -17,9 +17,8 @@
<body>
<div id="map"></div>
-<script type="text/javascript" src="http://lab.marcon.me/jhere/tire.js"></script>
+<script type="text/javascript" src="http://code.tirejs.com/dist/all/tire-1.1.1.js"></script>
<script type="text/javascript" src="../tire.adapter.js"></script>
-<!-- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> -->
<script type="text/javascript" src="../jhere.js"></script>
<script type="text/javascript">
var heatMapData = [
View
@@ -26,29 +26,40 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//Using jHERE in your websites and applications is really easy.
//
- //Include either jQuery or Zepto.JS at the end of your page
+ //Include either jQuery, Zepto.JS or Tire.js at the end of your page
//
//`<script type="text/javascript" src="js/jquery.min.js"></script>`
//
// or
//
//`<script type="text/javascript" src="js/zepto.min.js"></script>`
//
+ // or
+ //
+ //`<script type="text/javascript" src="js/tire.min.js"></script>`
+ //
//[Download](https://github.com/mmarcon/jhere/archive/master.zip) the plugin code, copy it in your project folder and
- //add the necessary script tags below jQuery or Zepto.JS. **If you are using Zepto.JS**
+ //add the necessary script tags after jQuery, Zepto.JS or Tire.js. **If you are using Zepto.JS**
//then you will need to **include the Zepto adapter** before including the plugin.
//
//<pre><code>&lt;script type="text/javascript" src="js/zepto.adapter.js"&gt;
//&lt;!--Only when using Zepto--&gt;
//&lt;/script&gt;</code></pre>
//
+ //**If you are using Tire.js**
+ //then you will need to **include the Tire adapter** before including the plugin.
+ //
+ //<pre><code>&lt;script type="text/javascript" src="js/tire.adapter.js"&gt;
+ //&lt;!--Only when using Tire--&gt;
+ //&lt;/script&gt;</code></pre>
+ //
//`<script type="text/javascript" src="js/jhere.js"></script>`
//And you are done.
//
//Make sure the DOM element that will contain the map has the appropriate
//size via CSS, e.g. by setting width and height.
//
- //**Note that jHERE requires Zepto.JS or jQuery > 1.7.**
+ //**Note that jHERE requires Zepto.JS, jQuery > 1.7 or Tire.js >= 1.1.1**
var plugin = 'jHERE',
defaults, H, _ns, _ns_map, _JSLALoader,
_credentials, bind = $.proxy, P,
@@ -626,8 +637,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
}
/*
- jHERE is compatible with jQuery > 1.7 and Zepto
- which both have the on method in the prototype.
+ jHERE is compatible with jQuery > 1.7, Zepto and Tire
+ which all have the on method in the prototype.
jQuery <= 1.7 does not have on.
*/
View
@@ -91,9 +91,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
return d.removeData.apply(d, arguments);
};
- //Export Zepto as jQuery so there is no need
- //to check for it in the plugin.
-
//$.proxy implementation from Zepto source code
var _zid = 1;
function zid(element) {
@@ -129,5 +126,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
}
return event;
};
+ //Export Tire as jQuery so there is no need
+ //to check for it in the plugin.
window.jQuery = $;
}(tire));
View
@@ -347,7 +347,7 @@ body {
header {
position: relative;
- height: 64rem;
+ height: 40rem;
margin: 0;
overflow: hidden; }
header .overlay {
@@ -359,8 +359,6 @@ header {
background: #000;
opacity: 0.65;
z-index: 10; }
- header.page {
- height: 40rem; }
header nav {
background: #222222;
background: rgba(34, 34, 34, 0.9);
View
@@ -71,13 +71,13 @@ header {
}
position: relative;
- height: 64rem;
+ height: 40rem;
margin: 0;
overflow: hidden;
- &.page {
- height: 40rem;
- }
+ // &.page {
+ // height: 40rem;
+ // }
nav {
background: $navbackground;
View
@@ -2,29 +2,40 @@
<p>Using jHERE in your websites and applications is really easy.</p>
-<p>Include either jQuery or Zepto.JS at the end of your page</p>
+<p>Include either jQuery, Zepto.JS or Tire.js at the end of your page</p>
<p><code>&lt;script type="text/javascript" src="js/jquery.min.js"&gt;&lt;/script&gt;</code></p>
<p>or</p>
<p><code>&lt;script type="text/javascript" src="js/zepto.min.js"&gt;&lt;/script&gt;</code></p>
+<p>or</p>
+
+<p><code>&lt;script type="text/javascript" src="js/tire.min.js"&gt;&lt;/script&gt;</code></p>
+
<p><a href="https://github.com/mmarcon/jhere/archive/master.zip">Download</a> the plugin code, copy it in your project folder and
-add the necessary script tags below jQuery or Zepto.JS. <strong>If you are using Zepto.JS</strong>
+add the necessary script tags after jQuery, Zepto.JS or Tire.js. <strong>If you are using Zepto.JS</strong>
then you will need to <strong>include the Zepto adapter</strong> before including the plugin.</p>
<pre><code>&lt;script type="text/javascript" src="js/zepto.adapter.js"&gt;
&lt;!--Only when using Zepto--&gt;
&lt;/script&gt;</code></pre>
+<p><strong>If you are using Tire.js</strong>
+then you will need to <strong>include the Tire adapter</strong> before including the plugin.</p>
+
+<pre><code>&lt;script type="text/javascript" src="js/tire.adapter.js"&gt;
+&lt;!--Only when using Tire--&gt;
+&lt;/script&gt;</code></pre>
+
<p><code>&lt;script type="text/javascript" src="js/jhere.js"&gt;&lt;/script&gt;</code>
And you are done.</p>
<p>Make sure the DOM element that will contain the map has the appropriate
size via CSS, e.g. by setting width and height.</p>
-<p><strong>Note that jHERE requires Zepto.JS or jQuery > 1.7.</strong></p> </div> <div id="section-3"> <h3>Make a map</h3>
+<p><strong>Note that jHERE requires Zepto.JS, jQuery > 1.7 or Tire.js >= 1.1.1</strong></p> </div> <div id="section-3"> <h3>Make a map</h3>
<p><code>$('.selector').jHERE(options);</code></p>
View
@@ -55,7 +55,7 @@
<section>
<p>
<strong>Maps are cool</strong>, but map APIs are complicated. jHERE solves this problem
- by offering a simple but powerful map API in the form of a <strong>jQuery (or Zepto.JS) plugin</strong>.
+ by offering a simple but powerful map API in the form of a <strong><a href="http://jquery.com/">jQuery</a> (or <a href="http://zeptojs.com/">Zepto.JS</a>, or <a href="http://tirejs.com/">Tire</a>) plugin</strong>.
</p>
<p class="download-link"><a href="https://github.com/mmarcon/jhere/archive/master.zip" class="download">Download jHERE</a> and start making beautiful maps now!</p>
<p>

0 comments on commit 4b8a2ca

Please sign in to comment.