Skip to content

Instantly share code, notes, and snippets.

@siteslave
Created February 20, 2013 08:09
Show Gist options
  • Save siteslave/4993835 to your computer and use it in GitHub Desktop.
Save siteslave/4993835 to your computer and use it in GitHub Desktop.
Tab event on click
$('a[href="#tab_anc2"]').click(function(){
var hn = $('#hn').val(),
gravida = $('#sl_anc_gravida2').val();
anc.ajax.get_history(hn, gravida, function(err, data){
anc.set_history(data);
});
});
@siteslave
Copy link
Author

ฟังก์ชัน anc.ajax.get_history()

get_history: function(hn, gravida, cb){
            var url = 'pregnancies/anc_get_history',
                params = {
                    hn: hn,
                    gravida: gravida
                };

            app.ajax(url, params, function(err, data){
                err ? cb(err) : cb(null, data);
            });
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment