I'm using the jQuery UI tabs and have a set of tabs defined. In each of those tabs, I would be having some links and I would like to open the results of those link click on the same tab itself rather that being opened in a new window.
The example from jQeury website shows this:
But I guess this is to open the tabs in the same panel which is the default behaviour. How do I now get the links also open up in the same tab panel?
jQuery selectors are awesomely powerful and you can get as fancy as you want with regards to selecting elements you need. That said, I always try and be as specific as I possibly can. It not only keeps your selectors simpler, but it will also improve performance because it means less DOM traversal for jQuery.
When you can do
Personally, I'd use the jQuery's live() function over the load event if all you need to do there is apply a click handler. I have a demo working on jsfiddle. Maybe you can modify your code from my demo and make something work:
I have another design related question. The entire application that I'm building is based on struts and tiles. Now if I click on the link that opens a new page on the same tab. Well good for one flow. But what if this url redirects to the home page? Attached is the screenshot of one such redirect. Looks wierd. How to get rid of this situation and make the redirect not to appear under the tab but rather refresh the entire page? I'm attaching the screenshots of the flow.