$slug = $post->post_name;
$content = apply_filters('the_content', $post->post_content);
?>
-
<div class="mid-content">
<div id="primary" class="content-area">
<main id="main" class="site-main">
// active: 1,
// heightStyle: "content"
// });
+ let tab = 0;
+ const slug = '<?php echo $slug?>';
+ const rooms = jQuery('#rooms-tabs').children('ul').children('li');
+ rooms.each(function(index, value){
+ let room = jQuery(this).children('a').text().toLowerCase()
+ room = room.substr(0, room.indexOf(' '));
+ if( slug.indexOf(room) !== -1 && room){
+ tab = jQuery(this).index();
+ }
+ })
+
jQuery( ".room-amenities" ).accordion({
collapsible: true,
active: false,
heightStyle: "content"
});
jQuery( "#rooms-tabs" ).tabs({
- active: 1
+ active: tab
});
+
});
</script>
<?php get_footer();
\ No newline at end of file