I have a grid of buttons ehere user onpens up the gird by clicking on the (Open Grid) link and then clicking on a button in that grid. What will then happen is that a set of buttons appear below the text box depending on the button selected from the grid. So if user select button "1" then button "A" appears, if user selects button "2" then buttons "A" and "B" appears and so on.

Now this is done through jquery code below:

$(".gridBtns").click(function() {

var clickedNumber = this.value;

$('.answerBtns').each(function (index) {
if (index < clickedNumber)


But what I want to do is that if user selects button "True or False" from the grid, I want only the buttons "True" and "False" under the text box and if user selects "Yes or No" button from the gird, then I only want buttons "Yes" and "No" to display under the text box, How can this be do in my jquery code?

Also if user selects "True or False" button or "Yes or No" button, then I want the "Number of Answers" text box to disappear and display the span tag "N/A" only, does anyone know to do this in jquery.

Thanks and code is in jsfiddle, click [here][1]

[1]: http://jsfiddle.net/pSy97/10/