Skip to content

Commit fdba682

Browse files
committed
update with latest js
1 parent 0e06acd commit fdba682

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

1.3.0/bootstrap-twipsy.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@
9090

9191
actualWidth = $tip[0].offsetWidth
9292
actualHeight = $tip[0].offsetHeight
93-
placement = _.maybeCall(this.options.placement, this.$element[0])
93+
94+
placement = maybeCall(this.options.placement, this, [ $tip[0], this.$element[0] ])
9495

9596
switch (placement) {
9697
case 'below':
@@ -193,15 +194,10 @@
193194
/* TWIPSY PRIVATE METHODS
194195
* ====================== */
195196

196-
var _ = {
197-
198-
maybeCall: function ( thing, ctx ) {
199-
return (typeof thing == 'function') ? (thing.call(ctx)) : thing
200-
}
201-
197+
function maybeCall ( thing, ctx, args ) {
198+
return typeof thing == 'function' ? thing.apply(ctx, args) : thing
202199
}
203200

204-
205201
/* TWIPSY PLUGIN DEFINITION
206202
* ======================== */
207203

0 commit comments

Comments
 (0)