I know this old one, but I noticed an error in the code you wrote:
$("#tabs").{ selected: add });
It should be
$("#tabs").tabs({ selected: add });
In addition, the selected option is deprecated as indicated in jquery ui 1.9, as indicated here . Recommended parameter active , details here
In either case, use the index of the tab you want to open, not the href value; those. if you want to open the 3rd tab, use
$("#tabs").tabs({ selected: 2 });
or
$("#tabs").tabs({ active: 2 });
check this fiddle
source share