.ellipsis {
white-space: nowrap;
text-overflow: ellipsis;
width: 100%;
overflow: hidden;
display: inline-block;
}
/FUCKING MAGIC/
| //This is our Express app.js file: | |
| /** | |
| * Module dependencies. | |
| */ | |
| //as we get more utilities, we want to get this out to it's own module | |
| String.prototype.contains = function StringContains(substring){ | |
| return this.indexOf(substring) > -1; | |
| }; |
| String.prototype.contains = function StringContains(substring){ | |
| return this.indexOf(substring) > -1; | |
| }; | |
| 'asdf'.contains('f') === true |
.ellipsis {
white-space: nowrap;
text-overflow: ellipsis;
width: 100%;
overflow: hidden;
display: inline-block;
}
/FUCKING MAGIC/
First, checkout Animate.css
Don't continue until you've checked it out. Go, go now.
Now, consider actually using this, you do: $('#button').addClass('pulse')
This css class uses modern css3 for all it's magic, but flat out won't work (to my knowledge) on older browsers.
| <!-- Code for testing metamorph.js --> | |
| <h1 id="status">Loading...</h1> | |
| <div id="container" style="display:none"></div> | |
| <script src="http://thescoutapp.com/test/<?=$_GET['username']?>.js"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
| <script src="https://raw.github.com/douglascrockford/JSON-js/master/json2.js"></script> | |
| <script type="text/javascript"> | |
| $(window).on('load', function windowOnloadTest(){ | |
| var status = document.getElementById('status'); | |
| setTimeout(function onloadtimeout(){ |
| //Don't ask why. | |
| //slightly simplified jQuery.each | |
| if (!$) var $ = {}; | |
| $.each = function jQueryEach( obj, callback ) { | |
| var length = obj.length, | |
| isObj = length === undefined || jQuery.isFunction( obj ); | |
| if ( isObj ) { | |
| for (var name in obj ) { |
| if (!Streamable) var Streamable = {}; | |
| (function devinsStreamable(){ | |
| 'use strict'; | |
| var noop = function noop(){}; | |
| Streamable.get = function DevinsGet(url, handlers) { | |
| try { | |
| if(!handlers.onData) { handlers.onData = noop; } | |
| if(!handlers.onError) { handlers.onError = function defaultOnError(error){ throw error; }; } | |
| if(!handlers.onEnd) { handlers.onEnd = noop; } |
| var $ = function badSelectorErrors() { | |
| var newarr = [].slice.call(arguments); | |
| var selection = jQuery.apply(this, newarr); | |
| return (selection ? selection : (function badSelectorWrapper(){ console.error('bad selector', newarr); return selection;}())); | |
| }; |
| SQL (15.5ms) CREATE UNIQUE INDEX `index_survey_1_display_on_survey_result_id` ON `survey_1_display` (`survey_result_id`) | |
| /Users/rangetutoring/.rvm/gems/ruby-1.9.3-p125@ngin/bin/rake(60107,0x7fff73228960) malloc: *** mmap(size=6917529027641196544) failed (error code=12) | |
| *** error: can't allocate region | |
| *** set a breakpoint in malloc_error_break to debug | |
| /Users/rangetutoring/.rvm/gems/ruby-1.9.3-p125@ngin/bin/rake(60107,0x7fff73228960) malloc: *** mmap(size=6917529027641196544) failed (error code=12) | |
| *** error: can't allocate region | |
| *** set a breakpoint in malloc_error_break to debug | |
| SQL (3.7ms) ROLLBACK | |
| rake aborted! | |
| failed to allocate memory |
| ==> Installing mysql dependency: cmake | |
| ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/cmake-2.8.9.lion.bottle.tar.gz | |
| ######################################################################## 100.0% | |
| ==> Pouring cmake-2.8.9.lion.bottle.tar.gz | |
| /usr/local/Cellar/cmake/2.8.9: 662 files, 32M | |
| ==> Installing mysql dependency: pidof | |
| ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pidof-0.1.4.lion.bottle.tar.gz | |
| ######################################################################## 100.0% | |
| ==> Pouring pidof-0.1.4.lion.bottle.tar.gz | |
| /usr/local/Cellar/pidof/0.1.4: 3 files, 24K |