I have an issue with using multiple values in a data tag, and applying a filter based on the id of this. because its showing multiple ids in the data tag it wont show both ids.
Example at http://jsfiddle.net/rWhVN/
<script type="text/javascript">
$(function () {
$('#content').removeClass('nojs');
$('.row').not('#q1').hide();
$('select').on('change', function () {
var question = $(this).parent().parent().attr('id');
var answerID = $(this).children('option:selected').attr('id');
var loadQuestion = $(this).children('option:selected').data('load');
$('#' + question).addClass('answered');
$('.row').not('.answered').hide();
$('#' + loadQuestion).fadeIn();
console.log(loadQuestion);
});
});
</script>
<option id="q1a1" data-load="q2, q8">Answer 1</option>
Question one answer one should show question two and question eight.
Not sure how you split this out, so any help appreciated.