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
/** | |
* Google Material Design style card depth | |
* Can receive an int between -5 and 5 (negatives use inset shadows) ex: @include depth(5); @include depth(-3) | |
*/ | |
@mixin depth($layer) { | |
@if $layer > 0 { | |
$inset: 0; | |
$offset: null; | |
} @else { | |
$inset: inset; |
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
/** | |
* Ensures the data-* is updated visually when the data is updated by jQuery | |
* Example: $('.foo').data('bar', 'value').trigger('changeData'); | |
*/ | |
$(document).on('changeData', '.foo', function(e) { | |
$(this).attr('data-bar', $(this).data('bar')); | |
}); |
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
// Any new html added via ajax can be triggered, or binded to | |
$(document).ajaxComplete(function() { | |
setTimeout(function(){ | |
// Magic, example: $('[data-tooltip]').tooltip(); | |
}, 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
// Thanks to @intuitivepixel for the original code to inspire this | |
/** | |
* EMBER APPLICATION DEFINITION | |
*/ | |
window.App = Ember.Application.create(); | |
/** | |
* INITIALIZE FOUNDATION | |
*/ | |
$(document).foundation(); |
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
.tabs-content > .content { | |
@extend .animated; | |
&.active { | |
@extend .fadeIn; | |
} | |
} |
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 {{input}} to support html5 range. | |
* Example: {{input type="range" value=myProperty max="500"}} | |
* Uses rangeslider.js plugin for IE9 support and to look pretty | |
* Fires optional onInit, onSlide, and onSlideEnd events | |
*/ | |
Ember.TextSupport.reopen({ | |
attributeBindings: ['min', 'max', 'step'], | |
initRangeSlider: function() { | |
if (this.get('type') === 'range') { |
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
// Don't forget to turn off close_on_esc in your foundation initialization | |
// $(document).foundation({ reveal: { close_on_esc: false } }); | |
$(document).on('keydown.reveal.custom', dom('reveal'), function(event) { | |
var isFullscreen = (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement); | |
if (event.keyCode === 27 && !isFullscreen) $(document).foundation('reveal', 'close'); | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
myBool: false, | |
actions: { | |
toggleBool: function() { | |
this.set('myBool', !this.get('myBool')); | |
} |
OlderNewer