jQuery tabs UI issue
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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?
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I'm seeing the alert being triggered but the link does not open.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Why do:
When you can do
Your example code doesn't really match with what you're trying to do. You're ID for the tabs in the HTML is #tabs but your code uses #example. Also, the HTML isn't loading tabs via ajax on demand but your JavaScript implies that it does because of using the load: event. So it is difficult to determine where the actual problem is.
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:
http://jsfiddle.net/KN2rc/1/
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
The code that I posted above was just a sample that I was trying with a static html page. So there was some confusion with copy pasting stuff here. anyways, below is what I tried:
The above code sample seems to work perfectly.
When I tried the jsfiddle example, the link opens in a new window rather than in the same tab. Here is how I used it (with the live function):
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Following is what I have:
And the Javascript:
What I need to do instead is to use a form instead of a href. Well, in that case how will the load function work in the above javascript if I click a submit button in my form?
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
| I think I'll just lie down here for a second. And ponder this tiny ad: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |










