Closed mstafkmx closed 11 years ago
I am using backbone and RequireJS. colectores.js: define([], function () { jQuery.support.cors = true; $(document).ready(function () { console.log("colectores.js loaded"); alertify.success("Hi"); }); }); I have tried to use alerify en others files, but it not works.I load alertify using requireJS
the library detects if define
is used and doesn't expose alertify
globally. If you want to use with AMD, you need to include it as a dependency:
define( [ PATH_TO_ALERTIFY ], function ( alertify ) {
alertify.success( 'Hi' );
} );
Thanks Fabian. Tengo otro error. la notificación sale en el fondo de la página pero no desparece. I'm using css for bootstrap.
did you also include the alertify.core.css
? you need both the core and theme styles.
Thanks for your time. It works.
Great
Can you provide more info? A demo page, code samples...