php - Stop jqueryUI Tab 0 from loading by default


I can not find a solution to a simple problem: when all myjqueryUI Tabs are set to beajax populated, then tab 0 is loaded by default every time I open the page... but I want the default tab to be tab 2. It can be accomplished with setting active property to tab id, but if I useactive : 2 in tabs init call, it first fires ajax request for tab 0, aborts it and then fires request for tab 2... I want to avoid that ajax request for tab 0. How can I do that in HTML+PHP environment?




Try selected : 2

and and older thread

How to set a default tab with Jquery UI

$('#tabvanilla > ul').tabs({ selected: 1 });



Try this, Add following line in your ajax file. (where you send your result to your main file)

$( "#your-selector" ).tabs({ active: 2 }); 

People are also looking for solutions to the problem: apache - PHP and RAW SOCKETS on linux


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.