Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5971255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:29:29+00:00 2026-05-22T20:29:29+00:00

I am adding some custom tabs to a jquery ui tab control. $(#tabs).tabs(add,#tabContent0,CLICK ME

  • 0

I am adding some custom tabs to a jquery ui tab control.

$("#tabs").tabs("add","#tabContent0","CLICK ME TO CHANGE PAGE",0);
$('a[href="#tabContent0"]').attr("href","javascript:window.location='http://www.google.co.uk';");

Yes this is a bit of a hack, but it is exactly what i need and provide a nice way to give links back to previous parent pages.

jquery throws the following exception: “jQuery UI Tabs: Mismatching fragment identifier.”

This is thrown on the line which appears to attempt to make the tab container visible in jquery ui (exact line wont help as is minified and custom build from official site).

Obviously im just redirecting but jquery has additional code to select the tab (which doesnt exist). In internet explorer, if the user has script errors enabled they will see the exception be thrown just before the window location changes, which I just cant have happen.

I cant put try catch around this code because it is the code inside jquery ui that throws the exception.

Is there anyway I can prevent this exception being thrown or achive the same thing but a different way without having to modified jquery ui ?

Edit: I am now wondering if there is a way to override the on click event hook placed on the element by jquery .. its definitely doing something there i cant see.

Edit: I have to log off now but I have made some progress, if someone can just help me get the right URL, using this code it prevents the exception, but redirects me to “http://myurl/undefined”

$('#tabs').bind('tabsselect', function(event, ui) {

if(ui.index<2) //ignore this will change to get current tab count -1 (so the end tab is left as it is
{
        window.location=$('#'+ui.tab).attr("href"); //attr href is undefined, how do i use ui.tab properly to get the right url
        return false;
}

});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:29:30+00:00Added an answer on May 22, 2026 at 8:29 pm

    It works OK for me in Chrome and IE8.

    I also tried this code and it worked:

    $("#tabs").tabs("add","#tabContent0","CLICK ME TO CHANGE PAGE",0);
    $('a[href="#tabContent0"]').click(function() {
        document.location='http://www.google.co.uk/';
    });
    

    Instead of changing href attribute, I add a handler on the click event of the new tab. This will make the tab to be switched and then the location changed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am adding some user controls dynamically to a PlaceHolder server control. My user
I'm currently adding some new extended classes to this code: foreach (BaseType b in
I was thinking of adding some Achievements to our internal bug-tracking and time logging
I'm adding some functionality to my site so that users can upload their own
I'm adding some lazy initialization logic to a const method, which makes the method
I'm thinking about adding some kind of copy protection to one of my tools.
I am overriding a Grid, adding some customer features. One of the features is
I am considering adding validation on some insert and update statements for MS SQL
When adding an EditItemTemplate of some complexity (mulitple fields in one template), and then
I am doing some significant refactoring and feature-adding on a project, and have just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.