I use this code to call the controller when I click on the tab. When I click on the second tab, I clear the second and vice versa. The problem, I can't put the result of my $.get in the div (tabs-1 or tabs-2). I see there is a result (data) with firebug
Any idea ?
$("#tabs").bind('tabsselect', function (event, ui) {
switch (ui.index) {
case 0:
$("#tabs-2").empty();
$.post("/Controller/Index", { variable1: 1, variable2: 0 },
function (data) {
$("#tabs-1").text(html);
});
break;
case 1:
$("#tabs-1").empty();
$.post("/Controller/Index", { variable1: 2, variable2: 1 },
function(data){
$("#tabs-2").text(html);
});
break;
}
});
Update1 : In the "data" result there is an ..... I'd like get the content and display it in tabs-2 as HTML. That's means if there are I have the see them.