Что не так с кодом JQuery?Новое в JQuery noob
<script type="text/javascript">
$(".header").click(function() {
$header = $(this);
//getting the next element
$content = $header.next();
//open up the content needed - toggle the slide- if visible, slide up, if not slidedown.
$content.slideToggle(500, function() {
//execute this after slideToggle is done
//change text of header based on visibility of content div
$header.text(function() {
//change text based on condition
return $content.is(":visible") ? "Collapse" : "Expand";
});
});
</script>
Когда я наводил курсор на тег закрывающего скрипта, он говорит «Ожидание большего количества символов-источников».
Это поможет, если заголовок вашего вопроса на самом деле описал вопрос. Неважно, если вы новичок в чем-то. –