Q:

how to get radio button group selection

I have the following code although is there a more elegant way to getting the selected radio value as I'm already inside the code for the radio button group.  This is to get the selected radio button within a group.
Many thanks,
$('input[name=pig]').change(function () {

    // this seems redundant
    namespace('bla').myVariable = $('input[name=pig]:checked').val();  

    // ie. something like
    namespace('bla').myVariable = $(this).checked.val();
});

A:

I think this is what you're trying to achieve:
namespace('bla').myVariable = this.value;

