Answer the question
In order to leave comments, you need to log in
How to fix the function that generates the output of the document content?
I designed the output of the article's table of contents, as indicated here:
https://dle-faq.ru/faq/phpquest/20523-pomogite-sde... I
fixed the function only by replacing find('h3,h4') with find('h2,h3 ').
The whole code is here: https://jsfiddle.net/u5hz7v92/
Now I have subheadings in the document wrapped in a tag <a>
, which is not necessary.
Screenshot of the source code:
How to change the function so that the subheadings in the document do not turn into a link, while the "anchors" from the table of contents work?
Answer the question
In order to leave comments, you need to log in
because the submit button must be inside the form (tag <form>
), and you most likely create a modal window somewhere at the end of the page.
Hang a handler on jquery
$('button.submit').on('click', function() {
$('form').submit();
});
The beginning of the form <form ...> is somewhere in non-existence. Perhaps this is the problem.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question