Quantcast
Channel: Musings of a code slave » AJAX/JavaScript
Viewing all articles
Browse latest Browse all 10

Linking to specific panel or tab in jQuery UI widgets

$
0
0

Dreamweaver CC has replaced its Spry widgets, such as accordion and tabbed panels, with jQuery UI equivalents. This means that one of my most requested tutorials on linking to a specific panel or tab needed to be rewritten for jQuery UI. The jQuery UI version is here. If you’re still using Spry, the Spry version is still online.

Unlike Spry, jQuery doesn’t have a built-in method for extracting the values from a URL, so I have created a simple JavaScript function that takes as its argument the name of a variable passed through a query string and returns its value. All you need to do is to copy the function definition, and make a couple of minor changes to the code that initializes the accordion or tabs.

Although I’ve written this mainly for Dreamweaver users, the code is not Dreamweaver-specific. It works with any jQuery UI accordion or tabs widget.


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images