Revert "Add correct method to define new in a backbone"

This commit is contained in:
Shiva Poudel 2017-11-15 11:24:10 +05:45 committed by GitHub
parent 4db2a8aa69
commit 07784c3ee2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 8 deletions

View File

@ -9,8 +9,7 @@
*/
$.fn.WCBackboneModal = function( options ) {
return this.each( function() {
var WCeachBackboneModal = new $.WCBackboneModal( $( this ), options )
( WCeachBackboneModal() );
( new $.WCBackboneModal( $( this ), options ) );
});
};
@ -25,12 +24,10 @@
var settings = $.extend( {}, $.WCBackboneModal.defaultOptions, options );
if ( settings.template ) {
var BackboneModal = new $.WCBackboneModal.View({
target: settings.template,
string: settings.variable
});
BackboneModal();
new $.WCBackboneModal.View({
target: settings.template,
string: settings.variable
});
}
};