Results 1 to 3 of 3

Thread: jQuery UI TABS - Update URL Hash

  1. #1
    Join Date
    May 2010
    Location
    Sacramento, CA
    Posts
    91
    Thanks
    23
    Thanked 2 Times in 2 Posts

    Default jQuery UI TABS - Update URL Hash

    This is extremely frustrating! I've tried all browsers and none of them work.

    the below code does nothing.


    Code:
    $(function() {
        	 $("#tabs").tabs();
            $("#tabs").bind('tabsshow',function(event, ui) {
                window.location = ui.tab;
            });
      });
    Neither does this!

    Code:
    $("#tabs").tabs({
         show: function(event, ui) {
                window.location = ui.tab;
            }
    });

    Any suggestions or input is appreciated.
    Last edited by crobinson42; 06-22-2013 at 07:15 PM. Reason: solved

  2. #2
    Join Date
    May 2010
    Location
    Sacramento, CA
    Posts
    91
    Thanks
    23
    Thanked 2 Times in 2 Posts

    Default

    It's a bug in the UI, here's the solution:

    Code:
    $('#tabs ul li a').click(function () {location.hash = $(this).attr('href');});

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,030
    Thanks
    44
    Thanked 3,210 Times in 3,172 Posts
    Blog Entries
    12

    Default

    I'm not real familiar with that script. But I imagine the results depend upon one's intent and how the tabs are setup. As long as your solution works for you, that's fine. But it might not actually be a bug. Could be though.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Replies: 3
    Last Post: 09-15-2012, 04:04 AM
  2. highlight current anchor hash? jQuery
    By blwow in forum JavaScript
    Replies: 4
    Last Post: 02-12-2011, 09:13 PM
  3. jquery on Animated Collapsible DIV v2.4 needs update
    By FrickenTrevor in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 02-16-2010, 03:31 AM
  4. Mouseover Tabs Menu Script Update Request
    By amt_agg in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 02-12-2009, 10:08 AM
  5. Ajax tabs and jquery conflict
    By sylver in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 09-22-2008, 04:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •