You'll need both jquery and bootstrap. Simply enable the accordion effect with:
$('.collapse').collapse()
UPDATE
This javascript will auto-update the panel-title with the input text
$(document).ready(function(){
$('#question').change(function(){
var text = $(this).val()
console.log(text)
$('#collapseOne').collapse({
toggle: true
})
$('#title').append(text)
})
})