jQuery Address Plugin with Navigation and Tabs -


i'm having little problem jquery address plugin.

i must add navigation , tabs @ same time.

there 2 problems seems can't figure out.

1) when clicking on navigation element, instead of changing location path path + href of link, adds "home.html#/about.html".

2) , when go tab part change "id" since page not changed location.path adds firs page clicked. => "home.html#direction-tab" , when happens, can't link tab since it's pointing home page instead of contact page.

i read documentation tabs (using jquery ui), since html structure little different prefer added custom.

js:

$.address.change(function(event) {     if ( event.value != undefined && event.value != '/' ) {         $('#content').load(event.value.replace(/\//,'')+ ' #content')     } }) 

i tried add titles links , work them 1 of exmaples in live site, didn't seems quite logic behind it.

jsfiddle

it seems figure out.

$(document).on('click', '.tabs a', function() {     var internal_path = $(this).attr('rel').replace(/\w+\:/, '');     var href = $(this).attr('href');     $.address.value(internal_path+href);     return false; }); 

Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -