The reason it doesn't work for the first tab is because you initialized the tab strip twice on the same element $('#tabstrip')
. Since you bound the select
event on the first initialization, the subsequent initialization overwrote it (the select event isn't handled anymore). You even answered the problem yourself by stating that it works if you comment the second initialization line out.
I'm not entirely sure what you're trying to accomplish with the setTimeout()
function in the second example. It's unnecessary.
Using e.preventDefault()
works as expected. JSFiddle: http://jsfiddle.net/w9586/6/