javascript - jQuery notify plugin not working in another JS file -


i using jquery notify plugin. include js files in header. calling $.notify function in js file using ajax, there cannot access $.notify function.

my ajax file here including in header also:

$.ajax({     url:'index.php?page=ajax_insertdimension.php',     type:'post',     data:'code='+dcode+'&des='+ddesc,     success:function(msg){        $.notify({         title: 'email notification',         text: 'you received e-mail boss. should read right now!',         image: "<img src='images/mail.png'/>"     }, {         style: 'metro',         classname: 'info',         autohide: false,         clicktohide: true     });       addcols();         }    })  

sometimes success method work, have specify data type "msg" argument there in parameter success function. can done adding datatype parameter post method specified in documentation here jquery.post()

$.ajax({ url:'index.php?page=ajax_insertdimension.php', type:'post', data:'code='+dcode+'&des='+ddesc, success:function(msg){    $.notify({     title: 'email notification',     text: 'you received e-mail boss. should read right now!',     image: "<img src='images/mail.png'/>" }, {     style: 'metro',     classname: 'info',     autohide: false,     clicktohide: true });   addcols();     },datatype: "json"}) 

this should work you. can put debugger in success function , test, whether callback getting called or not.


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -