Jquery更改ajaxSource变量

How can I change a variable in the below path:

$(document).ready(function() {
    $('#panel').slidePanel({
    triggerName: '#trigger',
    position: 'absolute',
    triggerTopPos: '180px',
    ajax: true,
    ajaxSource: 'list.php?t=type&aid=<?php echo "$AID"; ?>',
    clickOutsideToClose: false
    });
    .............

Upon users input?

If there are two buttons and each one sets variable 'type' to something different. Is this possible after page loads?

In general you would something like this

var t = $('#buttonID').val();

{
    ajaxSource: 'list.php?t=' + t + '&aid=$var',
}

but you will have to post more code for me to figure out what you are trying to do.

Edit:

I am not familiar with slide panel. So I am not 100% sure if putting its init function inside of a button click event will work the way you want. However this should solve the issue with setting the variable in the url.

var aid = '<?php echo $var; ?>';
$(document).ready(function() {

    $('.buttonClass').click(function() {
         var t = $(this).data('id');
         var url = "list.php?t=" + t + "&aid=" + aid;
         $('#panel').slidePanel({
             triggerName: '#trigger',
             position: 'absolute',
             triggerTopPos: '180px',
             ajax: true,
             ajaxSource: url,
             clickOutsideToClose: false
         });
    });
});

Then your buttons should look something like this

<button class=".buttonClass" data-id="1" >button 1</button>
<button class=".buttonClass" data-id="2" >button 2</button>