Skip to content

Commit

Permalink
simplified $ detection
Browse files Browse the repository at this point in the history
  • Loading branch information
dmotz committed Feb 17, 2014
1 parent 2287029 commit bf4202a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/oridomi.html
Expand Up @@ -542,7 +542,7 @@ <h1 id="setup">Setup</h1>

</div>

<div class="content"><div class='highlight'><pre>$ = <span class="hljs-keyword">if</span> (<span class="hljs-built_in">window</span>.jQuery <span class="hljs-keyword">or</span> <span class="hljs-built_in">window</span>.$)?.data <span class="hljs-keyword">then</span> <span class="hljs-built_in">window</span>.$ <span class="hljs-keyword">else</span> <span class="hljs-literal">null</span></pre></div></div>
<div class="content"><div class='highlight'><pre>$ = <span class="hljs-keyword">if</span> <span class="hljs-built_in">window</span>?.$?.data <span class="hljs-keyword">then</span> <span class="hljs-built_in">window</span>.$ <span class="hljs-keyword">else</span> <span class="hljs-literal">null</span></pre></div></div>

</li>

Expand Down
2 changes: 1 addition & 1 deletion oridomi.coffee
Expand Up @@ -156,7 +156,7 @@ noOp = ->
# Set a reference to jQuery (or another `$`-aliased DOM library).
# If it doesn't exist, set to null so OriDomi knows we are working without jQuery.
# OriDomi doesn't require it to work, but offers a useful plugin bridge if present.
$ = if (window.jQuery or window.$)?.data then window.$ else null
$ = if window?.$?.data then window.$ else null

# List of anchors and their corresponding axis pairs.
anchorList = ['left', 'right', 'top', 'bottom']
Expand Down
2 changes: 1 addition & 1 deletion oridomi.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion oridomi.map

Large diffs are not rendered by default.

0 comments on commit bf4202a

Please sign in to comment.