!!!5
%head
    %title
        How to teach your baby tracker
    %meta{
        name: 'viewport',
        content: 'width=device-width, initial-scale=1',
    }
    %script{
        src: 'https://code.jquery.com/jquery-2.1.3.min.js',
        type: 'text/javascript',
    }
    %link{
        href: '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css',
        rel: 'stylesheet',
    }
    - block extrahead
%body
    .container
        - block body
    %script{
        src: '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js',
        type: 'text/javascript',
    }
    :javascript
        $(function() {
            $('body').on('click', '[rel=ajax-post]', function(e) {
                e.preventDefault();
                var params = {
                    csrfmiddlewaretoken: '{{ csrf_token }}'
                };
                var $button = $(e.currentTarget);
                var url = $button.attr('href');
                $.post(url, params, function(data) {
                    $button.prop('disable', true);
                });
            });
        });
    - block final-inline-script

!!!5
%head
    %title
        How to teach your baby tracker
    %meta{
        name: 'viewport',
        content: 'width=device-width, initial-scale=1',
    }
    %script{
        src: 'https://code.jquery.com/jquery-2.1.3.min.js',
        type: 'text/javascript',
    }
    %link{
        href: '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css',
        rel: 'stylesheet',
    }
    - block extrahead
%body
    .container
        - block body
    %script{
        src: '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js',
        type: 'text/javascript',
    }
    :javascript
        $(function() {
            $('body').on('click', '[rel=ajax-post]', function(e) {
                e.preventDefault();
                var params = {
                    csrfmiddlewaretoken: '{{ csrf_token }}'
                };
                var $button = $(e.currentTarget);
                var url = $button.attr('href');
                $.post(url, params, function(data) {
                    $button.addClass('disabled');
                });
            });
        });
    - block final-inline-script

Add the disabled class instead
Add the disabled class instead
