Fixed tour navigation in iPhone browsers
This commit is contained in:
parent
7211b87ec4
commit
efce8ae3ea
2 changed files with 19 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
|||
$jq(function () {
|
||||
|
||||
// Bind to scroll.
|
||||
$(window).scroll(function () {
|
||||
$(window).scroll(function() {
|
||||
//Display or hide scroll to top button.
|
||||
if ($(this).scrollTop() > 100) {
|
||||
$('#scroll-top-link').fadeIn();
|
||||
|
@ -11,7 +11,7 @@ $jq(function () {
|
|||
});
|
||||
|
||||
// Function for scrolling to top.
|
||||
$('#scroll-top-link').click(function (e) {
|
||||
$('#scroll-top-link').click(function(e) {
|
||||
$("html, body").animate({
|
||||
scrollTop: 0
|
||||
}, 600);
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
$jq(function() {
|
||||
// Destination, relative path starting with a slash.
|
||||
var path = '/';
|
||||
// Destination, relative path, don't start with a slash.
|
||||
var path = '';
|
||||
|
||||
var langPath = location.pathname.replace(/^\/+/, '') + '/';
|
||||
var basePath = Drupal.settings.basePath ? Drupal.settings.basePath : '';
|
||||
basePath = basePath == '/' ? '' : basePath;
|
||||
if (basePath.length > 0 && langPath.indexOf(basePath) == 0) {
|
||||
langPath = langPath.substring(basePath.length);
|
||||
var langPath = '';
|
||||
var mainPath = location.pathname ? location.pathname : '/';
|
||||
var basePath = Drupal.settings.basePath ? Drupal.settings.basePath : '/';
|
||||
if (mainPath.indexOf(basePath) == 0) {
|
||||
mainPath = mainPath.substring(basePath.length);
|
||||
}
|
||||
argPath = mainPath.split('/');
|
||||
if (argPath[0] && argPath[0].length == 2) {
|
||||
langPath = argPath[0] + '/';
|
||||
argPath.shift();
|
||||
}
|
||||
if (path == '' && ((argPath[0] == 'user' && !argPath[1]) || (argPath[0] == 'user' && !argPath[2]))) {
|
||||
path = basePath + mainPath;
|
||||
} else {
|
||||
path = basePath + langPath + path;
|
||||
}
|
||||
langPath = langPath.substring(0, langPath.indexOf('/'));
|
||||
path = langPath.length == 2 ? basePath + '/' + langPath + path : basePath + path;
|
||||
|
||||
var prev = Drupal.t("« Prev");
|
||||
var next = Drupal.t("Next »");
|
||||
|
|
Reference in a new issue