This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Extend jQuery slightly to determine existence of element */ | |
jQuery.fn.exists = function() { | |
return this.length > 0; | |
} | |
/* How to implement... */ | |
if ($(selector).exists()) { | |
// Do something | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;/* @po_mans_logger CurrentlyExecutingMethodName */; console.log( 'CurrentlyExecutingMethodName Scope' ); console.dir( { $parent: $parent, this: this } );/* @todo Remove - C'mon, you're better than this. */; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body><nav class="navbar navbar-inverse navbar-fixed-top"><div class="container"> <div class="navbar-header"><a class="navbar-brand" href="https://github.com/thingdomio/thingdom-js">Thingdom-JS Example</a> </div><div id="navbar" class="navbar-collapse collapse"></div> </nav> | |
<div class="jumbotron"> | |
<div class="container"> | |
<h1>Welcome to Thingdom</h1> | |
<h3 class="text-muted">a thingdom-js example</h3> | |
<p class="well">... being a simple example of how to use the thingdom-js library in your own project to trigger push notifications, a realtime updating feed of content / data, and realtime status from within your webapp without extra sever-side configuration. As a front-end developer there are always challenges you encounter that cannot be solved simply in the front-end for a variety of reasons; some of those problems <em>could</em> be solved by using Thingdom in your project!</p><a class="btn btn-primary btn-lg" href="#" role="button">Call to Action</a> | |
</div> <!-- /.container --> | |
< |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<nav class="navbar navbar-inverse navbar-fixed-top"><div class="container"> <div class="navbar-header"><a class="navbar-brand" href="https://github.com/thingdomio/thingdom-js">Thingdom-JS Example</a> </div><div id="navbar" class="navbar-collapse collapse"></div> </nav> | |
<div class="container"> | |
<div id="thingdom" class="panel panel-default"> | |
<div class="hidden panel-heading"><h2 class="panel-title">Real Codes Already?</h2></div> | |
<div class="panel-body"> | |
<p><strong>Step One: Authenticate and initialize Thingdom</strong></p> | |
<p>You'll want to instantiate a new Thingdom object by passing in your API Secret:</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.page { | |
position: absolute;top: 0;left: 0;width: 100%;height: 100%; | |
transform: translate3d(0, 0, 0); | |
} | |
.left { | |
transform: translate3d(-100%, 0, 0); | |
} | |
.center { | |
transform: translate3d(0, 0, 0); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.noselect { | |
-webkit-touch-callout: none; | |
-webkit-user-select: none; | |
-khtml-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Include this after bootstrap.css | |
Add a class of 'col-xs-offset-*' and | |
if you want to disable the offset at a larger size add in 'col-*-offset-0' | |
Examples: | |
All display sizes (xs,sm,md,lg) have an offset of 1 | |
<div class="col-xs-11 col-xs-offset-1 col-sm-3"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var typicalValidEmailFormatRegExp = /(^[\S]+@[\S]+\.[\S]{2,63}$)/; // @fskirschbaum || My RegExp could beat up your RegExp. Fight Me. || Says, essentialy, a bunch of characters, an @ symbol, a bunch more characters, a single dot, ends with a group of characters between 2 and 63 (the allowed min/max size of valid .tld ). Allows a hefty chunk of expected valid email addresses, disallows most typical user error type input of invalid email address. boom. | |
if ( ___VAR___.match( typicalValidEmailFormatRegExp ) === null ) { return false; } | |
// see example here: @link https://regex101.com/r/vD9zK7/4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var simpleRFC2822EmailRegExp = /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/ | |
if ( ____placeholder____.match( complexRFX2822EmailRegExp ) === null ) { return false; } | |
// see data @link https://regex101.com/r/uU1fI9/1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var complexRFX2822EmailRegExp = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/; | |
if ( ____placeholder____.match( complexRFX2822EmailRegExp ) === null ) { return false; } | |
// see data @link https://regex101.com/r/oJ8nO1/1 |
OlderNewer