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
<button class="btn">123</button> |
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
// event-wrapper.js | |
(function(angular, factory) { | |
'use strict'; | |
if (typeof define === 'function' && define.amd) { | |
define([ | |
'angular' | |
], function(angular) { |
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
function number_format(num, precision, glue){ | |
num = parseFloat(num); | |
if(isNaN(num)) | |
num = 0; | |
precision = (!precision || isNaN(precision = parseInt(precision))) ? 2 : precision; | |
num = num.toFixed(precision); | |
glue = glue ? glue : ","; | |
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
!function(){ | |
if( typeof Array.prototype.map == 'function') | |
return; | |
Array.prototype.map = function(callback){ | |
var i = 0, | |
length = this.length, | |
res = []; | |
if( callback && typeof callback == 'function' ){ | |
for(;i<length;i++) |
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 handler = new Handler(); | |
function Handler(){ | |
var queues = []; | |
this.addQueue = function( method ){ | |
queues.push(method); | |
} | |
this.removeQueue = function( method ){ | |
queues.splice(queues.indexOf(method)-1, 1); | |
} |