zurb foundation - How to show/not show a Reveal depending on data being returned from an AJAX source -


i have convert system runs ajax script , displays alert if returned data length greater 0 ie message returned. runs on form load, , periodically thereafter via timer. i'm trying impliment using foundation 5.

when add reveal page, displays whether there's data or not. if use success callback function check length of returned data, how stop reveal displaying if length zero? i've tried following code:

    $('#messagemodal').foundation('reveal', 'open', {         url: 'check_message_ajax.php',         success: function(data) {             if(data.length == 0) {                 return false;  // tried "return;" ,  "stop;"             }         },         error: function() {             alert('failed loading modal');         }     }); 

any pointers appreciated.


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -