I'd like to have a vertical styled accordion tabs.
On the first tab, user will be asked a question like "Fruits or Veggies?"
Clicking on Fruits image would auto move to the second tab which would ask "Apples, Bananas, or Grapes?"
now let's assume user picked Veggies in the first tab... auto move to the second tab (again) but now asks "Carrots, Celery, or Potatoes?"
The display elements in the second tab are dependent on the selection choice of the user in the first tab. Thus a call to the database is required. However, I am trying to avoid users moving to multip开发者_Python百科le pages by utilizing a jquery slider effect to make it appear that the user is never moving pages.
Anyone have an idea where I can start? Examples? Templates or plugins? Even keyword searches?
I really appreciate your time.
Use jQuery load to load the content in the next tab when they click.
$(".tab a").click(function(){
qAns = $(this).attr('id');
$(this).children(".tab-content").load("content.php", {anwser: qAns});
});
Use something like this to change the tab to the next one:
var selected = $("#tabs").tabs("option", "selected");
$("#tabs").tabs("option", "selected", selected + 1);
精彩评论