How to create url specific? when we click menu tab?

jdlines
Offline
Last seen: 11 months 4 weeks ago
Mon, 08/29/2016 - 01:06
#1
How to create url specific? when we click menu tab?

Hi Tim support,

I wanna ask 2 couple things about sub menu tab

1st

is it possible to showing url detail, when we click sub menu tab?

for the sample, when we click sub menu tab #amenities so that the url will be like below

http://plateno.idekode.com/new/room-detail.html#amenities

please advise

2nd

On mobile version, when we click sub menu tab, can we make it auto scroll to the content sub menu? instead of fade, so make visitor easier to find the description details sub of menu tab

please advise

thank you

cindy
cindy's picture
Offline
Last seen: 11 hours 30 min ago
Mon, 08/29/2016 - 11:48

Hi,

Yes, we can support you with your 2 requests above. Please open file script.js and add the following code in the last line of the file.

Note: However, if you want to show url detail, when click menu tab, the page will blink once (it's like when you take a photo with a camera). We do not encourage you to show url detail. If you still want it, you have to accept that blink effect

You can follow our instruction if you want, we will try to fix it at the soonest time

function tabsRoomDetail(element, s, e) {
var _id = element.attr('href');

$('.room-detail_tab-header').find('li').removeClass('active');
element.parent().addClass('active');

$('.tab-pane').removeClass('active in');
$(_id).addClass('active in');
$('html, body').animate({scrollTop: ($(_id).offset().top - 120)}, 'slow'); // Effect scroll page

if(s == true) {
e.stopPropagation();
};
};

$(document).ready(function(){
$('.room-detail_tab-header a').click(function(e){
if($(window).width() < 996) {
tabsRoomDetail($(this), false, e); // Hide url detail
} else {
tabsRoomDetail($(this), true, e); // Show url detail
}
});
});
Log in or register to post comments