Skip to main content

Search and Top Navigation

#6713 closed bug (notabug)

Opened December 02, 2010 04:40PM UTC

Closed December 02, 2010 05:54PM UTC

anchor whose href matches current page passes accordion navigationFilter

Reported by: letterpress Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.accordion Version: 1.8.6
Keywords: Cc:
Blocked by: Blocking:
Description

if I have a page:

http://www.example.com/thispage.html

and i have an anchor within one of the of the accordion sections:

<a href="http://www.example.com/thispage.html"><img src="this_thumbnail.jpg"></a>

this will return true for the default navigationFilter, and cause this accordion section to open when the page loads, regardless of the intialized active state.

As a workaround, since i'm already using the BBQ plugin, i changed the navigationFilter to:

return $(this).attr("href").replace("#","") == $.param.fragment();

this way i'm only comparing the fragment of the href, not the entire href.

a better solution would be to limit the matched anchors to just the head element of the accordion, and not parse the href of all the anchors in the accordion content. if i have 1,000 of links loaded into the accordion, for instance, that's a lot of extra work just to find what the href of the accordion header is.

Attachments (0)
Change History (1)

Changed December 02, 2010 05:54PM UTC by scottgonzalez comment:1

resolution: → invalid
status: newclosed

This is not a bug, this is per design. If you want something else just set the active option properly on init.