Почему контент для левых рельсов не отображается?Html

Программисты Html
Ответить
Anonymous
 Почему контент для левых рельсов не отображается?

Сообщение Anonymous »

Очень новичок в HTML, я отлаживал большую часть этого, но контент (в настоящее время заполнителя) не будет отображаться ни для одного из элементов левой железной дороги. Например, левые имели рельсовый элемент "Neuroscience-Concept1", должен отображать латинский текст в этом разделе. Но все они показывают как пустые. Как я могу это исправить?









Home Category 1
[*]Home Category 2
[*]Home Category 3
[/list]



Placeholder 1
[*]Placeholder 2
[*]Placeholder 3
[/list]







Welcome to the Psychology of Design
Profound and inspirational introduction. Not sure it makes sense to have a left hand rail here, so
will probably lose that. Also, lots of latin. Ad lorum ipsum ignoramus.




OtherDiscussion1
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua.




Home Category 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua.



Home Category 2
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua.



Home Category 3
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua.




Placeholder1
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua.



Placeholder2
Ut ornare lectus sit amet est. Ligula ullamcorper malesuada proin libero nunc. Sed cras ornare
arcu dui. Fames ac turpis egestas maecenas pharetra convallis posuere morbi leo.



Placeholder3
Fringilla phasellus faucibus scelerisque eleifend donec.





// JavaScript for handling top nav and left rail links
const topNavLinks = document.querySelectorAll('.top-nav a');
const leftRailLinks = document.querySelectorAll('.left-rail a');
const leftRails = document.querySelectorAll('.left-rail');
const sections = document.querySelectorAll('.section');

// Function to activate top nav and show corresponding left rail and content
topNavLinks.forEach(link => {
link.addEventListener('click', function (event) {
event.preventDefault();

// Hide all sections
leftRails.forEach(rail => rail.style.display = 'none');
sections.forEach(section => section.classList.remove('active'));

// Show the corresponding section
const targetId = link.getAttribute('data-target');
const targetSection = document.getElementById(targetId);

// Always show the corresponding left rail
const targetLeftRail = document.getElementById(`${targetId}-rail`);
if (targetLeftRail) {
targetLeftRail.style.display = 'block';
}

if (targetSection) {
targetSection.classList.add('active');
}
});
});

// Function to handle left rail navigation clicks
leftRailLinks.forEach(link => {
link.addEventListener('click', function (event) {
event.preventDefault();

// Hide all content sections by default
sections.forEach(section => section.classList.remove('active'));

// Show the corresponding content section
const targetSection = document.getElementById(link.getAttribute('data-target'));
if (targetSection) {
targetSection.classList.add('active');
}
});
});

// Initial page load: Ensure that Home section is shown without left rail
document.querySelector('a[data-target="home"]').click();




< /code>
Я попробовал ряд изменений, ни один из которых не сработал. Каждый элемент левого рельса имеет пример текста (некоторые примечания для меня, какой -то просто латинский текст заполнителя), который должен отображаться, но все элементы навигации левой ручки просто отображают пустую страницу.

Подробнее здесь: https://stackoverflow.com/questions/794 ... displaying
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Html»