require(['config'], function() { require([ 'jquery' ], function($) { setTimeout(function() { mobMainObj.init(); }, 100); }); }); var mobMainObj = { init: function () { } }; var itp_fn_barcode = { init: function () { this.event(); }, event: function () { $('#ITP_BTN_BARCODE').on('click', function() { $(location).attr('href', 'app:scan'); }); }, callback: function (barcode) { alert(barcode); } };