Suppose I have:
main.js
$('.logo').click(function(){
window.location.reload();
});
$('.check-availaibility').click(function(){
$("html, body").animate({'scrollTop':'0'}, "slow");
});
$('#pincode').on("click",function(){
$('#pincode').val(null);
});
min.js
var proto = Flickity.prototype;
Flickity.createMethods.push('_createFade');
proto._createFade = function() {
this.fadeIndex = this.selectedIndex;
this.prevSelectedIndex = this.selectedIndex;
this.on( 'select', this.onSelectFade );
this.on( 'dragEnd', this.onDragEndFade );
this.on( 'settle', this.onSettleFade );
this.on( 'activate', this.onActivateFade );
this.on( 'deactivate', this.onDeactivateFade );
};
var updateSlides = proto.updateSlides;
proto.updateSlides = function() {
updateSlides.apply( this, arguments );
if ( !this.options.fade ) {
return;
}
// set initial opacity
this.slides.forEach( function( slide, i ) {
var alpha = i == this.selectedIndex ? 1 : 0;
slide.setOpacity( alpha );
}, this );
};
I want to import all the data from min.js and main.js to
master.js
import * from './min.js';
import * from './main.js';
How can i do that. I was trying the above statements. But it's not working.
Aucun commentaire:
Enregistrer un commentaire