javascript - Jquery Ui tabs url problem with page base -
i have problem jqueryui tabs.
i have code :
//the jquery tabs $( "#tabs" ).tabs(); //code open correct tab if write hash on url. works fine var hash = window.location.hash; var index = $("#tabs a").index($('#link-'+hash.replace('#',''))); if(index>=0) $("#tabs a").eq(index).click();
it works fine if don't put in page base href=... can open tab in new page right button of mouse , page opens correct tab selected.
if put in page base href=http://$_server['http_host']/ when open tab in new window right button of mouse, page opened incorrect. base of page, lose of url.
help please. sorry english
i don't understand
if put in page /" />
bit,
but 2 last lines reduced 1 think:
$('#link-'+hash.replace('#','')).click();
Comments
Post a Comment